Commit Graph

2427 Commits

Author SHA1 Message Date
Tom Lane a3f98d5795 Adjust lookup of client-side profile files (.pgpass and so on) as per
discussion on pgsql-hackers-win32 list.  Documentation still needs to
be tweaked --- I'm not sure how to refer to the APPDATA folder in
user documentation.
2005-01-06 18:29:11 +00:00
Dennis Bjorklund b8139ea397 Translation updates 2005-01-06 12:23:33 +00:00
Dennis Bjorklund 90f1507275 Translation updates 2005-01-06 12:14:36 +00:00
Dennis Bjorklund 883730edc8 Translation updates 2005-01-06 11:44:12 +00:00
Peter Eisentraut 381de28eb0 Translation updates 2005-01-06 09:07:17 +00:00
Peter Eisentraut c43bd11683 Translation updates 2005-01-06 08:46:07 +00:00
Tom Lane fdbeaaf90a Keep translations in step with synopses. 2005-01-06 00:11:56 +00:00
Tom Lane d877de9e6b Make pg_dump --oids work when default_with_oids = off. Per report from
Michael Fuhr.
2005-01-04 22:27:46 +00:00
Peter Eisentraut a2a5526ecb Translation updates 2005-01-03 22:39:24 +00:00
Tom Lane a17e589046 Adjust a few more copyright notices to match the format expected by
the src/tools/copyright script.
2005-01-01 22:14:33 +00:00
Tom Lane 7e1c8ef4fc Some more missed copyright notices. Many of these look like they
should have been caught by the src/tools/copyright script ... why
weren't they?
2005-01-01 20:44:34 +00:00
Bruce Momjian 2daed8c5b3 Update copyrights that were missed. 2005-01-01 05:43:09 +00:00
PostgreSQL Daemon 2ff501590b Tag appropriate files for rc3
Also performed an initial run through of upgrading our Copyright date to
extend to 2005 ... first run here was very simple ... change everything
where: grep 1996-2004 && the word 'Copyright' ... scanned through the
generated list with 'less' first, and after, to make sure that I only
picked up the right entries ...
2004-12-31 22:04:05 +00:00
Peter Eisentraut e14018dc5e Translation updates 2004-12-29 02:30:16 +00:00
Tom Lane d9236a69fc Make libpq default to localhost connections on machines without Unix-domain
sockets, rather than failing as it formerly did.  Revert the
thereby-obsoleted patch to make psql supply the localhost default.
2004-12-28 23:17:54 +00:00
Tom Lane 361f354109 Make sure --with-pgport option propagates into postgresql.conf.
Per gripe from Josh Berkus.
2004-12-27 20:39:21 +00:00
Peter Eisentraut 6dac6b89a0 Translation update 2004-12-27 14:24:22 +00:00
Tom Lane 9405e14e00 Switch order of WHERE clauses in tab completion queries, as suggested
by Rod Taylor.  The foo_is_visible() functions are relatively slow and
so it pays to check them after checking the name pattern match.
2004-12-24 15:42:05 +00:00
Tom Lane 63a90720b4 Remove extra parenthesis. 2004-12-23 00:03:24 +00:00
Bruce Momjian c21c658b36 Add error checking for starting a win32 service using pg_ctl. 2004-12-21 17:58:30 +00:00
Bruce Momjian 556e72124c Return proper error exit code on pg_ctl -w start failure. 2004-12-21 17:38:01 +00:00
Peter Eisentraut ca4736ab92 Translation update 2004-12-21 11:14:18 +00:00
Tom Lane 59bffa3707 Adjust pg_resetxlog to handle 8.0 WAL file names properly. 2004-12-20 01:42:11 +00:00
Tom Lane 1553be4a0b Prevent evaluation of backticks while discarding unwanted arguments
after an unknown or failed psql backslash command, and also while
discarding "extra" arguments of a putatively valid backslash command.
In the case of an unknown/failed command, make sure we discard the
whole rest of the line, rather than trying to resume at the next
backslash.  Per discussion with Thomer Gil.
2004-12-19 19:39:47 +00:00
Peter Eisentraut cd380b99cd Translation updates 2004-12-16 11:31:55 +00:00
Peter Eisentraut 6ad835f55f New translations 2004-12-15 17:50:20 +00:00
Peter Eisentraut fe4d1df375 Translation updates 2004-12-15 17:39:54 +00:00
Tom Lane 86a069bbed Cope with circularities involving a view's ON SELECT rule. I originally
thought there couldn't be any, but the folly of this was exposed by an
example from andrew@supernews.com 5-Dec-2004.  The patch applies the
identical logic already used for table constraints and defaults to ON
SELECT rules, so I have reasonable confidence in it even though it might
look like complicated logic.
2004-12-14 22:16:32 +00:00
Tom Lane 94e467061e Fix pg_dump to ensure that a comment on a table CHECK constraint cannot
be emitted too soon.  The previous code got this right in the case where
the CHECK was emitted as a separate ALTER TABLE command, but not in the
case where the CHECK is emitted right in CREATE TABLE.  Per report from
Slawomir Sudnik.

Note: this code is pretty ugly; it'd perhaps be better to treat comments
as independently sortable dump objects.  That'd be much too invasive a
change for RC time though.
2004-12-14 21:35:20 +00:00
Peter Eisentraut ec4aa14b68 Fix typo 2004-12-14 11:11:20 +00:00
Neil Conway 75e39c441e Prevent pg_resetxlog from being run as root. If this is allowed, some
root-owned files will be written to the data directory, leaving it in an
unusable state.
2004-12-14 01:59:41 +00:00
Peter Eisentraut 6ccb04f341 Translation updates 2004-12-13 21:49:10 +00:00
Peter Eisentraut 5483936ed3 New translations 2004-12-13 16:30:53 +00:00
Peter Eisentraut 965dd791f4 Translation updates 2004-12-13 16:28:23 +00:00
Peter Eisentraut f9a6ba184a Add missing newlines at end of error messages. 2004-12-12 18:26:29 +00:00
Peter Eisentraut 373825c9cd Translation updates 2004-12-12 18:09:18 +00:00
Peter Eisentraut b89df8fe60 Translation updates 2004-12-11 20:19:24 +00:00
Peter Eisentraut a31ec86ebe Translation updates 2004-12-11 20:10:14 +00:00
Peter Eisentraut e82cd783a1 Translation updates 2004-12-11 19:56:07 +00:00
Peter Eisentraut 4de679c710 Translation updates 2004-12-11 19:45:34 +00:00
Peter Eisentraut 10e960fb39 Translation updates 2004-12-11 19:09:08 +00:00
Peter Eisentraut 022a00b5f3 Translation updates 2004-12-11 19:03:49 +00:00
Peter Eisentraut 8efc721d52 Translation updates 2004-12-06 22:10:42 +00:00
Neil Conway b3f3092cad Fix off-by-1 bug in pg_ctl in -D handling, per report from pjmodos@parba.cz 2004-12-06 01:09:20 +00:00
Tom Lane 2ee3a720a4 Adjust help message for --no-owner, per Alvaro Herrera. 2004-12-03 18:48:19 +00:00
Bruce Momjian a6c1377085 Add \n to end of output for psql \s with no history file name.
This prevents the next psql prompt from showing up on the end of the
last history line.
2004-11-30 20:00:34 +00:00
Bruce Momjian f44c64c727 Quote SHELL arguments only on Win32. 2004-11-30 19:01:28 +00:00
Tom Lane 66cd815063 Clean up initdb's error handling so that it prints something more
useful than just \'failed\' when there's a problem.  Per gripe from
Chris Albertson.

In an unrelated change, use VACUUM FULL; VACUUM FREEZE; rather than
a single VACUUM FULL FREEZE command, to respond to my worries of a
couple days ago about the reliability of doing this in one go.
2004-11-29 03:05:03 +00:00
Bruce Momjian 5548122829 Add comment explaining possible compiler warning:
/*
     *  Some compilers with throw a warning knowing this test can never be
     *  true because off_t can't exceed the compared maximum.
     */
    if (th->fileLen > MAX_TAR_MEMBER_FILELEN)
        die_horribly(AH, modulename, "archive member too large for tar format\n");
2004-11-29 03:01:54 +00:00
Bruce Momjian ee814b4511 Have initdb display relative paths to start postmaster if used to invoke
initdb, and display in a path-native way.
2004-11-29 01:14:45 +00:00
Peter Eisentraut 99b735cc03 Work around lack of NLS support in libpgport by making those components
who use it scan the relevant source files for their own catalog.  It
creates a bit of duplicate work for translators, but it gets the job done
for now.
2004-11-27 22:44:15 +00:00
Tom Lane 90c3ebe4d7 Fix HAVE_OPTRESET to be HAVE_INT_OPTRESET. Typos spotted by Lorne Sunley. 2004-11-27 18:51:08 +00:00
Neil Conway e17766c12e Trivial fix for a bug introduced in r1.94 of help.c: we want to only
include "\s" in \? output when readline is enabled, but that commit
supressed "\s" whether readline was enabled or not.
2004-11-24 04:58:42 +00:00
Peter Eisentraut 2663e0c2e9 New translations 2004-11-23 23:13:26 +00:00
Peter Eisentraut 98f5efe774 Translation updates 2004-11-23 22:16:04 +00:00
Peter Eisentraut 050a0074c2 Translation update 2004-11-18 10:09:59 +00:00
Tom Lane c36496a101 Include <getopt.h> if available, to avoid warnings on Windows. 2004-11-17 21:37:47 +00:00
Tom Lane 6444bc3535 Set DEFAULT_EDITOR to notepad.exe on Windows, as per recent discussion. 2004-11-17 18:32:31 +00:00
Tom Lane 5d72ef83fd Miscellaneous Cygwin build fixes from Reini Urban. 2004-11-17 17:46:24 +00:00
Tom Lane 18b58350db Be sure length limit passed to snprintf matches what malloc was given.
Just paranoia ...
2004-11-17 16:34:42 +00:00
Peter Eisentraut 8a1821ab5b Translation update 2004-11-16 22:58:44 +00:00
Tom Lane 3d1e269e7e Don't quote the value of EDITOR on Unix, only on Windows. Per discussion. 2004-11-15 23:15:12 +00:00
Tom Lane f6474586ea Use English-style quotes in error messages, per Serguei Mokhov. 2004-11-14 23:36:53 +00:00
Bruce Momjian fc402fdf2d pg_restore --help improvements, from Tom Lane:
!       printf(_("  -d, --dbname=NAME        connect to database name\n"));

!       printf(_("  -C, --create             create the target database\n"));
2004-11-11 17:06:46 +00:00
Peter Eisentraut e9c05281b5 Get rid of perror(), substitute some better phrased error messages.
malloc() doesn't set errno, so most uses were buggy anyway.
2004-11-09 15:57:57 +00:00
Peter Eisentraut 1813d94664 Translation updates 2004-11-09 14:46:37 +00:00
Peter Eisentraut 7d8578a0c2 Clarify some strings 2004-11-09 14:39:44 +00:00
Peter Eisentraut ea182a9ef4 Translation update 2004-11-09 14:38:48 +00:00
Bruce Momjian 0d3b8e9a50 Allow win32/cygwin link against the first matching library symbol rather
than erroring out.  This is the Unix behavior.
2004-11-08 05:23:26 +00:00
Peter Eisentraut c22b4fa386 New translation 2004-11-07 23:38:19 +00:00
Peter Eisentraut 58b33f2e85 Translation updates 2004-11-07 23:28:20 +00:00
Tom Lane 04baa0ebf9 Update pg_dump to use SET DEFAULT_TABLESPACE instead of explicit
tablespace clauses; this should improve compatibility of dump files.
Philip Warner, some rework by Tom Lane.
2004-11-06 19:36:02 +00:00
Bruce Momjian 1d13bed735 Remove directory from cmd.exe default shell. 2004-11-06 17:56:40 +00:00
Bruce Momjian 86100de856 Variable initializer no longer necessary. 2004-11-06 05:20:41 +00:00
Bruce Momjian 7ba377431e Tests for COMSPEC in the right place and supply a reasonable shell
default on Win32.
2004-11-06 04:29:40 +00:00
Tom Lane 98e8b48053 Create 'default_tablespace' GUC variable that supplies a TABLESPACE
clause implicitly whenever one is not given explicitly.  Remove concept
of a schema having an associated tablespace, and simplify the rules for
selecting a default tablespace for a table or index.  It's now just
(a) explicit TABLESPACE clause; (b) default_tablespace if that's not an
empty string; (c) database's default.  This will allow pg_dump to use
SET commands instead of tablespace clauses to determine object locations
(but I didn't actually make it do so).  All per recent discussions.
2004-11-05 19:17:13 +00:00
Bruce Momjian 54691d414d Fix psql \e and \! for Win32. 2004-11-04 22:25:14 +00:00
Peter Eisentraut d0066b9fa4 Tab completion for CREATE TABLESPACE arguments. Patch by Joachim Wieland. 2004-11-02 16:10:05 +00:00
Peter Eisentraut bb2d1ce8f1 Translation updates 2004-11-02 09:28:41 +00:00
Peter Eisentraut 005b1b5fc8 Translation updates 2004-11-02 09:20:22 +00:00
Bruce Momjian 7fad5fff0d That's just the lovely way windows handles a "segfault". Gotta be really
interesting for MS to catch all those dumps...

Anyway. Oops. Seems I ran my regression tests with the old psql, and
just managed to update the backend, when I tested that patch. Turns out
there are codepaths where we'd access the Critical Section before it was
initialized. Attached patch breaks the initializeation off to a separate
part and adds that one to a much earlier position in the program.

Magnus Hagander
2004-11-01 19:21:50 +00:00
Tom Lane 44e8a968e3 Invent a new, more thread-safe version of PQrequestCancel, called PQcancel.
Use this new function in psql.  Implement query cancellation in psql for
Windows.  Code by Magnus Hagander, documentation and minor editorialization
by Tom Lane.
2004-10-30 23:11:27 +00:00
Peter Eisentraut 94c502f1db Translation updates 2004-10-28 09:01:06 +00:00
Peter Eisentraut fc4cfc366d Translation updates 2004-10-28 08:54:09 +00:00
Bruce Momjian a7049b52e3 Have pg_ctl status always output to stdout, even stopped status, not stderr. 2004-10-27 19:44:14 +00:00
Bruce Momjian 3fe704209a Canonicalize Win32 path coming in from pg_ctl -D, idea from Magnus. 2004-10-27 17:17:09 +00:00
Peter Eisentraut 2514e904da New translation 2004-10-27 11:44:09 +00:00
Peter Eisentraut ad6b3975c9 Translation updates 2004-10-27 11:22:18 +00:00
Peter Eisentraut 2db0bde40e Translation update 2004-10-27 11:13:29 +00:00
Peter Eisentraut cd92d85d11 Translation updates 2004-10-27 11:09:33 +00:00
Peter Eisentraut 979b0be4c3 Translation updates 2004-10-27 10:22:47 +00:00
Peter Eisentraut eb7fc3eb1f Translation updates 2004-10-27 10:13:49 +00:00
Tom Lane 85b2facdd8 Write config files as text not binary, per Magnus Hagander. 2004-10-24 15:55:29 +00:00
Dennis Bjorklund 8b9aaea888 Translation update 2004-10-23 14:48:03 +00:00
Dennis Bjorklund fea9cf6231 Translation updates 2004-10-23 07:29:27 +00:00
Dennis Bjorklund 3b15cc9129 Translation update 2004-10-23 06:48:59 +00:00
Dennis Bjorklund f4eaed6bd9 Translation updates 2004-10-23 06:40:24 +00:00
Dennis Bjorklund 0b7705fff8 Translation updates 2004-10-23 06:32:53 +00:00
Tom Lane 521408a56f Don't use LC_MESSAGES value on WIN32, since it doesn't work.
Magnus Hagander
2004-10-22 22:30:57 +00:00
Peter Eisentraut 4733dcc592 Translation updates 2004-10-22 16:05:02 +00:00
Peter Eisentraut 77c0204a37 Message styling 2004-10-22 16:04:35 +00:00
Dennis Bjorklund c70b7b7a6c Translation update 2004-10-22 14:14:24 +00:00
Dennis Bjorklund f4eb440279 New swedish translation of pg_config 2004-10-22 14:13:04 +00:00
Dennis Bjorklund cae2018b49 Translation updates 2004-10-22 13:41:47 +00:00
Tom Lane c58675b428 Prevent pg_ctl from being run as root. Since it uses configuration files
owned by postgres, doing "pg_ctl start" as root could allow a privilege
escalation attack, as pointed out by iDEFENSE.  Of course the postmaster would
fail, but we ought to fail a little sooner to protect sysadmins unfamiliar
with Postgres.  The chosen fix is to disable root use of pg_ctl in all cases,
just to be confident there are no other holes.
2004-10-22 00:24:18 +00:00
Peter Eisentraut 3371b99e65 New translation 2004-10-19 13:39:27 +00:00
Peter Eisentraut 9f2d5df3b9 Organize the help output a little better. Improve clarity of some messages. 2004-10-19 13:38:53 +00:00
Peter Eisentraut 6e53f18b84 New translation 2004-10-18 22:19:15 +00:00
Peter Eisentraut 2aa8d0a807 Might want to initialize the gettext library, if we're going to do all that
translation work.
2004-10-18 22:19:00 +00:00
Peter Eisentraut a465f24a1e Translation update 2004-10-18 22:18:03 +00:00
Peter Eisentraut cd8db9532b New translation 2004-10-18 17:58:54 +00:00
Peter Eisentraut d5213d94b9 Translation updates 2004-10-18 17:56:46 +00:00
Peter Eisentraut 68970b3e61 New translation 2004-10-18 17:53:40 +00:00
Bruce Momjian 0060b3c8eb The attached patch fixes psql's win32 frontend-only build, by using
pg_strcasecmp in variables.c, and #ifdef'ing out PostmasterPid in
miscadmin.h.

Dave Page
2004-10-18 16:24:40 +00:00
Tom Lane 877179245d Tweak pg_dump to handle default tablespaces correctly --- same logic
as the corrected pg_get_indexdef code.
2004-10-18 00:20:41 +00:00
Peter Eisentraut ca14e3bc01 New translation 2004-10-17 21:12:55 +00:00
Peter Eisentraut 8de2e16f1f New translation 2004-10-17 21:10:25 +00:00
Peter Eisentraut 2f2121ffbe Translation updates 2004-10-17 21:05:03 +00:00
Peter Eisentraut 63d4f1cdbf Adjust message 2004-10-17 21:04:41 +00:00
Bruce Momjian 72f9013741 Fix Cygwin using of pg_ctl by not usig START.
Reini Urban
2004-10-16 03:32:08 +00:00
Bruce Momjian 88fd162ef6 Allow pg_ctl to determine the server is up when getting a request for a
password.

Make password error message a #define and use it consistently.

Sean Chittenden
2004-10-16 03:10:17 +00:00
Bruce Momjian 063216ef3d Allow psql booleans to use OFF or off.
Michael Paesold
2004-10-15 05:02:31 +00:00
Bruce Momjian 8613eac6c4 Fix pg_ctl -D handling for Win32:
C:\msys\1.0\home\y-asaba>pg_ctl -D data restart
	waiting for postmaster to shut down...LOG:  received smart shutdown
	request.
	LOG:  shutting down
	LOG:  database system is shut down
	done
	postmaster stopped

	postmaster starting

	C:\msys\1.0\home\y-asaba>postmaster.exe: invalid argument: "'-D'"
	Try "postmaster.exe --help" for more information.

Yoshiyuki Asaba
2004-10-15 04:54:33 +00:00
Bruce Momjian a49f6ad014 Add full path in error report for version mismatch of binaries. 2004-10-15 04:32:28 +00:00
Neil Conway 8ff374ce91 psql code cleanup:
- refactor a bunch of code to call a separate function print_msg() which
checks whether "silent mode" is enabled before printing an error
message.

- rename "silence_mode" to "silent_mode", which IMHO makes more sense

- make the error messages we emit in "waiting" mode more consistent; I
believe this fixes a recent error message regression
2004-10-15 01:36:12 +00:00
Bruce Momjian 5c267325ec Add 'int' cast for getpid() because some Solaris releases return long
for getpid().
2004-10-14 20:23:46 +00:00
Bruce Momjian e92b007715 pg_restore wording improvement, per Peter. 2004-10-13 14:24:16 +00:00
Bruce Momjian c55de22d94 Enable service use by Cygwin of pg_ctl. 2004-10-13 10:35:05 +00:00
Bruce Momjian 90542f556b Clarify pg_restore --help wording. 2004-10-13 00:42:53 +00:00
Peter Eisentraut 0fd37839d9 Message style revisions 2004-10-12 21:54:45 +00:00
Peter Eisentraut 8532a1aabe New translation 2004-10-12 18:10:16 +00:00
Peter Eisentraut 893094415b Translation updates 2004-10-12 18:01:20 +00:00
Peter Eisentraut 7656e55639 Translation update 2004-10-12 17:57:14 +00:00
Neil Conway 0e72b9d440 Cosmetic improvements/code cleanup:
- replace some function signatures of the form "some_type foo()" with
"some_type foo(void)"
- replace a few instances of a literal 0 being used as a NULL pointer;
there are more instances of this in the code, but I just fixed a few
- in src/backend/utils/mb/wstrncmp.c, replace K&R style function
declarations with ANSI style, remove use of 'register' keyword
- remove an "extern" modifier that was applied to a function definition
(rather than a declaration)
2004-10-10 23:37:45 +00:00
Peter Eisentraut 0d069c53c3 Translation improvement 2004-10-09 17:41:17 +00:00
Bruce Momjian 6c77feed3a Add win32 version information for pg_config Makefile. 2004-10-09 03:57:39 +00:00
Bruce Momjian 67608a393b Make getpid() use %d consistently for printing. 2004-10-09 02:46:42 +00:00
Tom Lane 07ccbeb360 Include schema name in pg_restore -l output, per request from Phil Endecott. 2004-10-08 15:03:26 +00:00
Neil Conway 9bf6effd8e Another minor tweak to psql startup: set the default values for the PROMPT1,
PROMPT2 and PROMPT3 variables before we read any of the settings specified
via the user on the command-line or in psqlrc, so that the latter can
override the former. Per original patch from Ingo van Lil, simpler fix
suggested by Tom Lane.
2004-10-08 11:24:19 +00:00
Tom Lane 6a640d1e02 Add missing null terminator to escaped string; clean up unnecessarily
obscurantist coding conventions.
2004-10-07 18:57:26 +00:00
Bruce Momjian 6d46ea25f2 Add one more byte to malloc for null storage. 2004-10-07 17:29:12 +00:00
Bruce Momjian d1cee5495a Escape single quotes and backslashes used in locales placed in
postgresql.conf.

Zhong Xubin
2004-10-07 16:53:25 +00:00
Bruce Momjian a5d7ba773d Adjust comments previously moved to column 1 by pgident. 2004-10-07 15:21:58 +00:00
Bruce Momjian 8a28f50f8a Improve pgindent processing of comment after 'else'.
Improve comment of pg_dump Win32 link workaround.
2004-10-07 13:45:51 +00:00
Neil Conway 3ba0fc760c Capitalize some SQL keywords the previous commit missed, for consistency. 2004-10-06 23:31:45 +00:00
Bruce Momjian d7e0ebdf8e Say "history is not supported" and remove "on this platform" for lack of
readline.
2004-10-06 19:04:10 +00:00
Bruce Momjian c62a5465fb Suppress psql \s help display for platforms like Win32 that don't
typically install witn readline, and throw an error if they try to
access it.
2004-10-06 18:39:16 +00:00
Bruce Momjian a95a82e7f0 Uppercase SQL keywords in query for clarity. 2004-10-06 17:43:07 +00:00
Bruce Momjian d7b7a4a648 This simple patch fixes a typo, ensure pg_config is removed in win32
and correct some splitted message mistake.

Euler Taveira de Oliveira
2004-10-06 17:21:45 +00:00
Bruce Momjian dedb53f29c Fix pg_dumpall to use double-quote for Win32 arguments.
Luiz K. Matsumura
2004-10-06 17:02:02 +00:00
Bruce Momjian 4542581bf1 Adjustment to test on unix domain socket variable for pg_hba.conf
default settings, rather than just Win32.
2004-10-06 09:13:10 +00:00
Bruce Momjian c93872d891 Remove pg_hba.conf 'local' line for Win32 because it doesn't support unix domain
connections.

Andrew Dunstan
2004-10-06 09:01:18 +00:00
Neil Conway d42d427252 Slightly rearrange psql startup code so that we read psqlrc before printing
the startup banner. This allows "\set QUIET on" in psqlrc to do what the
user probably intended. Patch from Sean Chittenden, editorializing from
Neil Conway.
2004-10-06 08:20:58 +00:00
Bruce Momjian da67c919d9 Add Win32 version info to client binaries.
Magnus Hagander
2004-10-05 19:30:25 +00:00
Bruce Momjian abef6b5162 Add distclean target to pgevent. 2004-10-05 17:26:39 +00:00
Bruce Momjian ee7de3d662 Make sure no libs use libpgport by removing it from the link line. 2004-10-04 20:36:12 +00:00
Bruce Momjian 2e8252d67a Fix MinGW link failure with new libpgport processing. 2004-10-04 20:32:58 +00:00
Bruce Momjian b5ddfb4bd0 Readd -DFRONTEND to client makefiles because it still affects win32.h
defines.
2004-10-04 18:05:55 +00:00
Bruce Momjian 24201b4bc6 Make libpgport be front-end only and make libpgport_srv be a backend
library that uses palloc, ereport, etc.  This simplifies the makefiles
for client applications.
2004-10-04 13:43:59 +00:00
Peter Eisentraut 8d5ff6bad1 Translation update 2004-10-03 20:29:24 +00:00
Peter Eisentraut 0654f0f669 Translation updates 2004-10-03 20:24:26 +00:00
Tom Lane bbd1e1cc68 Don't assume PQdb() will return a valid result from a failed connection. 2004-10-01 17:25:55 +00:00
Bruce Momjian 70c8fcb287 An include path got missed out of the patch - see the attached fix.
This also adds debug build support to src/bin/psql/win32.mak.

Dave Page
2004-09-28 16:17:26 +00:00
Bruce Momjian e1c8b37afb Add new macro as shorthand for MS VC and Borland C++:
+ #if   defined(_MSC_VER) || defined(__BORLANDC__)
+ #define       WIN32_CLIENT_ONLY
+ #endif
2004-09-27 23:24:45 +00:00
Bruce Momjian e017051006 More MS VC and BCC psql compile cleanups. 2004-09-27 22:20:40 +00:00
Bruce Momjian 866627f84d Make adjustment for MS VC and BCC compile of psql, from Dave Page. 2004-09-27 22:06:41 +00:00
Bruce Momjian f6b896b17a Improve MS VC builds for psql by handlling flex properly and prevent
rename prototype conflict.
2004-09-27 20:37:20 +00:00
Peter Eisentraut 353b70aef3 Translation updates 2004-09-27 20:26:03 +00:00
Peter Eisentraut ad6a6170e5 New translations 2004-09-27 20:21:24 +00:00
Bruce Momjian 32b24bfa97 Remove inclusion of windows.h now that it is included in c.h, per idea
from Peter.
2004-09-27 19:16:03 +00:00
Neil Conway 6a84723d7d Minor tweak to pg_controldata usage information, per suggestion from
Dennis Björklund. Also, remove some redundant #include directives.
2004-09-23 00:47:44 +00:00
Neil Conway a94edb4c7b Some improvements for the tab-completion of psql. This should
address all of the items in the todo list and adds some new
things as well. Specifically:

* Add support for ALTER SEQUENCE ...
* Add "RENAME TO" for ALTER TRIGGER xx ON yy
* Pick proper table for ALTER TRIGGER xx ON ...
* Support for ALTER USER xxx ...
* Fix ALTER GROUP xxx DROP ...
* Fix ALTER DOMAIN xxx DROP ...
* Remove "OWNER TO" from ALTER DOMAIN xx DROP ...
* Fix ALTER DOMAIN xx SET DEFAULT ..
* Prevent ALTER INDEX xxx SET TABLESPACE from using "TO"
* Support for ALTER LANGUAGE xxx (RENAME TO)
* More support for ALTER TABLE xxx ALTER COLUMN xxx ...
* More support for COPY

Greg Sabino Mullane
2004-09-22 04:25:16 +00:00
Tom Lane 5b564e5307 Fix some shortcomings in psql's autocommit-off mode concerning detection
of commands for which a transaction block should not be forced.  Recognize
VACUUM and other PreventTransactionChain commands; handle nested /* .. */
comments correctly; handle multibyte encodings correctly.
Michael Paesold with some kibitzing from Tom Lane.
2004-09-20 18:51:19 +00:00
Peter Eisentraut fbbdfa413e Translation update 2004-09-20 08:15:29 +00:00
Peter Eisentraut 398d4822a4 Translation updates 2004-09-20 07:57:14 +00:00
Peter Eisentraut cb2a8a9e00 Translation updates 2004-09-20 07:49:54 +00:00
Peter Eisentraut fa942e8010 Translation updates 2004-09-20 07:44:42 +00:00
Peter Eisentraut cb66748bdf New translation 2004-09-14 05:50:33 +00:00
Neil Conway 65ff0ed455 Fix small memory leak in psql. 2004-09-13 23:07:12 +00:00
Peter Eisentraut d69528881a Translation updates 2004-09-13 12:43:27 +00:00
Peter Eisentraut 95c034e311 Translation updates 2004-09-13 12:35:18 +00:00
Peter Eisentraut 77697dcaa3 New translations 2004-09-13 12:20:24 +00:00
Peter Eisentraut b972ab7178 New translation 2004-09-13 12:14:50 +00:00
Peter Eisentraut a67b5bd3b9 Translation updates 2004-09-13 12:11:22 +00:00
Tom Lane 1d681d6cee Fix some problems with restoring databases owned by non-superusers,
as per bug #1249; and remove the last vestiges of using \connect to
change authorization.
2004-09-10 20:05:18 +00:00
Bruce Momjian 3036b84b77 Adjust quotes for win32 build of psql. 2004-09-10 09:45:21 +00:00
Neil Conway ae7ea1395c psql consistency fixes from Greg Sabino Mullane: have \df show schema and
name first, make sure \di+ shows description last, and make \dl SQL look
a little more standard.
2004-09-10 04:10:53 +00:00
Bruce Momjian 35e88b512e Create pg_config_paths in port/ for win32 builds of psql. 2004-09-10 03:48:54 +00:00
Tom Lane 6ad853b975 Yet another place where someone was being careless about the arguments
of <ctype.h> macros.
2004-09-02 20:07:50 +00:00
Tom Lane a28961d5e0 Spelling correction, per Greg Mullane. 2004-09-02 17:58:41 +00:00
Bruce Momjian 8cef6ae522 Remove pg_config_paths.h from libpq *.mak builds so later MinGW builds
will succeed.
2004-09-02 02:02:02 +00:00
Bruce Momjian 453c670b61 Fix bcc to compile libpq by creating include file for path.c. 2004-09-01 23:45:16 +00:00
Bruce Momjian 4fa8b44749 Realign libpq and psql for need for path.c under Win32 VC and BCC. 2004-09-01 23:35:16 +00:00
Dennis Bjorklund b3d3e27bb8 Translation updates 2004-09-01 10:11:08 +00:00
Bruce Momjian 2a5f83c17c src/bin/psql/tab-complete.c =~ s/CONVERSATION/CONVERSION/;
Greg Sabino Mullane
2004-09-01 00:10:01 +00:00
Tom Lane c7040429e7 Fix obviously-utterly-untested noTocComments code. 2004-08-30 19:44:14 +00:00
Bruce Momjian 15d3f9f6b7 Another pgindent run with lib typedefs added. 2004-08-30 02:54:42 +00:00
Tom Lane 0ffe11abd3 Widen xl_len field of XLogRecord header to 32 bits, so that we'll have
a more tolerable limit on the number of subtransactions or deleted files
in COMMIT and ABORT records.  Buy back the extra space by eliminating the
xl_xact_prev field, which isn't being used for anything and is rather
unlikely ever to be used for anything.
This does not force initdb, but you do need to do pg_resetxlog if you
want to upgrade an existing 8.0 installation without initdb.
2004-08-29 16:34:48 +00:00
Bruce Momjian b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
Bruce Momjian da9a8649d8 Update copyright to 2004. 2004-08-29 04:13:13 +00:00
Bruce Momjian fe90fb4d37 The attached patch improves pg_ctl's win32 service code to eliminate
some possible causes of the stale postmaster.pid problem that some users
have reported.

- The service did not properly report that it accepts
SERVICE_CONTROL_SHUTDOWN events, thus it's possible the SCM simply
killed the postmaster on shutdown.

- 'WaitHints' are now given to the SCM to prevent it timing out if
pg_ctl doesn't respond to a control event quickly enough.

- During shutdown, the service checkpoint counter is incremented every
five seconds for up to a minute to prevent the SCM timing out and
assuming the service is not responding.

Dave Page
2004-08-28 23:26:37 +00:00
Bruce Momjian 922599464f Fix high-bit comparison compiler warning in pg_dump.
Philip Warner
2004-08-28 22:52:50 +00:00
Bruce Momjian c8702dcb8e Propogate pg_ctl -D to the postmaster for command-line identification. 2004-08-28 22:04:01 +00:00
Bruce Momjian a0a61f494d > > Another issue is that when installing the Postgres service with
> > "pg_ctl register -w ...." the "-w" parameter was not put in
> the registry "ImagePath"
> > value for the Postgres service. (I added it manually to test.) So I
> > suspect that "pg_ctl register" will need to be enhanced to add the
> > "-w" parameter to the registry settings.

Dave Page
2004-08-28 21:01:38 +00:00
Tom Lane 7584194cc9 Fix typo in comment, per Andrew Dunstan. 2004-08-25 20:07:57 +00:00
Peter Eisentraut a56cebb18f Translation update 2004-08-24 21:35:19 +00:00
Bruce Momjian 235caf4bb2 Fix tab completion for ALTER INDEX. 2004-08-21 18:45:59 +00:00
Bruce Momjian 34f34a041c Fix pg_ctl -w to properly wait on server startup. 2004-08-21 03:12:55 +00:00
Bruce Momjian 3ca998b951 Allow psql to use 7.4.X database by not referencing tablespaces.
Greg Sabino Mullan
2004-08-20 20:18:23 +00:00
Bruce Momjian f7168bd44c They are two different problems; the TOC entry is important for any
multiline command  or to rerun the command easily later.

Whereas displaying the failed SQL command is a matter of fixing the
error
messages.

The latter is complicated by failed COPY commands which, with
die-on-errors
off, results in the data being processed as a command, so dumping the
command will dump all of the data.

In the case of long commands, should the whole command be dumped? eg.
(eg.
several pages of function definition).

In the case of the COPY command, I'm not sure what to do. Obviously, it
would be best to avoid sending the data, but the data and command are
combined (from memory). Also, the 'data' may be in the form of INSERT
statements.

Attached patch produces the first 125 chars of the command:

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC Entry 26; 1255 16449270
FUNCTION
plpgsql_call_handler() pjw
pg_restore: [archiver (db)] could not execute query: ERROR:  function
"plpgsql_call_handler" already exists with same argument types
     Command was: CREATE FUNCTION plpgsql_call_handler() RETURNS
language_handler
     AS '/var/lib/pgsql-8.0b1/lib/plpgsql', 'plpgsql_call_han...
pg_restore: [archiver (db)] Error from TOC Entry 27; 1255 16449271
FUNCTION
plpgsql_validator(oid) pjw
pg_restore: [archiver (db)] could not execute query: ERROR:  function
"plpgsql_validator" already exists with same argument types
     Command was: CREATE FUNCTION plpgsql_validator(oid) RETURNS void
     AS '/var/lib/pgsql-8.0b1/lib/plpgsql', 'plpgsql_validator'
     LANGU...

Philip Warner
2004-08-20 20:00:34 +00:00
Bruce Momjian cecf41bd29 Attached is the third version of my patch that adds/fixes several things
to/in the psql-tabcomplete code. This diff includes the still missing
tab-complete support for TABLESPACE I already sent earlier. New in this
version of the patch is a small adaption of the tab-complete code to
support the adjusted SAVEPOINT-Syntax commited by Tom, as well as
completion of the only half working (and I think only by accident)
tabcomplete-suppport for "BEGIN [ TRANSACTION | WORK ]".

below is a complete list of the things I have changed with this patch:


*) add tablespace support for CREATE/DROP/ALTER and \db
*) sync the list of possible commands following ALTER with the docs (by
adding
AGGREGATE,CONVERSATION,DOMAIN,FUNCTION,LANGUAGE,OPERATOR,SEQUENCE,TABLESPACE
and TYPE)
*) provide a list of valid users after "OWNER TO"
*) tab-complete support for ALTER (AGGREGATE|CONVERSION|FUNCTION)
*) basic tab-complete support for ALTER DOMAIN
*) provide a list of suitable indexes following ALTER TABLE <sth>
CLUSTER ON(?)
*) add "CLUSTER ON" and "SET" to the ALTER TABLE <sth> - tab-complete
list(fixes incorrect/wrong tab-complete with ALTER TABLE <sth> SET
+<TAB> too)
*) provide a list of possible indexes following ALTER TABLE <sth> CLUSTER ON
*) provide list of possible commands(WITHOUT CLUSTER,WITHOUT OIDS,
TABLESPACE) following ALTER TABLE <sth> SET
*) sync "COMMENT ON" with docs by adding "CAST","CONVERSION","FUNCTION"
*) add ABSOLUT to the list of possible commands after FETCH
*) "END" was missing from the sql-commands overview (though it had
completion support!) - i know it's depreciated but we have ABORT and
others still in ...
*) fixes small buglet with ALTER (TRIGGER|CLUSTER) ON autocomplete
(CLUSTER ON +<TAB> would produce CLUSTER ON ON - same for TRIGGER ON)
*) adapt to new SAVEPOINT syntax
*) fix incomplete Support for BEGIN [ TRANSACTION | WORK ]

Stefan Kaltenbrunn
2004-08-20 19:24:59 +00:00
Bruce Momjian 1b5e0143b5 This patch allows pg_restore to recognize $-quotes in SQL queries. It
will treat any unquoted string that starts with a $ and has no preceding
identifier chars as a potential $-quote tag, it then makes sure that the
tag chars are valid. If so, it processes the $-quote.

Philip Warner
2004-08-20 16:07:15 +00:00
Bruce Momjian 09d4e96d7e Add ALTER INDEX, particularly for moving tablespaces.
Gavin Sherry
2004-08-20 04:29:33 +00:00
Bruce Momjian daa076c4fd > Please find attached a submission to add a "exit on error" option to
> pg_restore, as it seems that some people have scripts that rely on the
> previous "abort on error" default behavior when restoring data with a
> direct connection.
>
> Fabien Coelho
2004-08-20 04:20:23 +00:00
Bruce Momjian 1abf13db3c Add get_home_path() to use USERPROFILE on Win32 and HOME on Unix. 2004-08-18 02:59:12 +00:00
Bruce Momjian 33829a5e0f Throw error if initdb -L is not an absolute path. 2004-08-16 15:44:03 +00:00
Peter Eisentraut 3ea6d6d4d5 Translation updates 2004-08-14 19:16:07 +00:00
Tom Lane b681bf9323 Fix psql's COPY support to deal with \r\n line endings.
Andrew Dunstan, some further hacking by Tom Lane.
2004-08-13 22:59:29 +00:00
Tom Lane 2193121fa9 Fix breakage with PUBLIC schema. Try to untwist the remarkably contorted
logic a little bit.
2004-08-13 21:37:28 +00:00
Peter Eisentraut 1a36562d6a New translations 2004-08-13 16:47:30 +00:00
Peter Eisentraut 1c31374e3d Translation updates 2004-08-13 16:34:31 +00:00
Tom Lane 79f9ee9d15 Fix core dumps, inability to count, etc associated with canonicalize_path
patches.
2004-08-13 14:47:23 +00:00
Tom Lane 250e516051 Cause initdb to actually accept -s as intended, and fix some typos in
a comment.

Jon Jensen
2004-08-11 23:28:54 +00:00
Peter Eisentraut 81cca21818 Allow compilation when CODESET is not defined (OpenBSD). 2004-08-11 11:06:23 +00:00
Peter Eisentraut 7a7ffe944d Translation update 2004-08-11 09:27:20 +00:00
Peter Eisentraut f781ed4ed8 Translation updates 2004-08-10 19:06:21 +00:00
Peter Eisentraut 73730f49af Translation update 2004-08-10 18:59:57 +00:00
Peter Eisentraut 742781bdab Translation updates 2004-08-10 18:42:22 +00:00
Peter Eisentraut e21e121999 Translation update 2004-08-10 18:38:19 +00:00
Tom Lane b06c907645 Path-mangling logic was failing to account for paths containing mentions
of '.' or '..'.  Extend canonicalize_path() to trim off trailing occurrences
of these things, and use it to fix up paths where needed (which I think is
only after places where we trim the last path component, but maybe some
others will turn up).  Fixes Josh's complaint that './initdb' does not
work.
2004-08-09 20:20:47 +00:00
Bruce Momjian 640d0dc0f0 Fix compiler warning in the proper way. 2004-08-08 07:00:22 +00:00
Bruce Momjian 6ec4520a5b Supress warning about zero-length format string. 2004-08-08 06:58:00 +00:00
Bruce Momjian 7ee3c35152 Allow libpgport to call memory allocation routines even though
CurrentMemoryContext is DLLIMPORT on Win32.  Work around that by
creating stubs in the backend for palloc/pstrdup.

Also fix pg_dumpall to do proper quoting on Win32.
2004-08-08 06:44:36 +00:00
Tom Lane d48d86651c Remove bogus trailing dot from eventlog output, per Andreas.
Clean up README file a bit.
2004-08-07 17:55:59 +00:00
Bruce Momjian 21d16121bf Ignore trailing spaces in psql \h.
Greg Sabino Mullane
2004-08-07 03:36:07 +00:00
Tom Lane 18661f282b Revert badly-broken patch to dump comments on composite-type columns. 2004-08-06 18:18:42 +00:00
Bruce Momjian d6e05afc3d I have noticed that the latex format in psql has some bugs:
o "_" is not escaped, and causes TeX to abort, thinking it's a
  subscript outside of maths mode.  Most of my table and field names
  use underscores, so this is a really nasty one.
o The column count is calculated using the contents of opt_align. But
  opt_align has one extra element, and so it's always one too many.  I
  changed it to count the column headings, like all the other output
  formats.  There may be a bug in computing opt_align that this patch
  does not address, but I'm not yet familiar enough with the psql
  source to fix this as well.
o  The line drawing rules for each border setting (0-3) and expanded
  mode didn't always match the documented behaviour and what other
  formats (e.g. aligned) did.  I made it as conformant as possible,
  and also tidied the alignment of the first line of the footer, which
  was incorrectly indented.

Roger Leigh
2004-08-06 18:09:15 +00:00
Dennis Bjorklund b4cd416ab0 Translation updates 2004-08-05 06:50:27 +00:00
Dennis Bjorklund 4042abba10 Translation updates 2004-08-05 06:43:42 +00:00
Joe Conway 39ec59f30f Restore behavior of --pgxs option to that of the original shell script. 2004-08-05 03:11:55 +00:00
Tom Lane fcbc438727 Label CVS tip as 8.0devel instead of 7.5devel. Adjust various comments
and documentation to reference 8.0 instead of 7.5.
2004-08-04 21:34:35 +00:00
Tom Lane 576856b698 Dump comments on columns of composite types.
Instead of putting all the OWNER TO commands at the end, it dumps then
after each object.  This is WAY more readable and nice.  ACLs are still
at the end.

Christopher Kings-Lynne
2004-08-04 17:13:03 +00:00
Dennis Bjorklund 6568d64350 Translation updates 2004-08-04 16:40:11 +00:00
Peter Eisentraut 630bfcd10c Translation updates 2004-08-02 15:17:21 +00:00
Peter Eisentraut 082ca46df9 Translation update 2004-08-02 15:11:19 +00:00
Bruce Momjian e3b8530cc3 Readd pg_config --pgxs code. 2004-08-02 12:34:14 +00:00
Tom Lane f0efe26402 Support USING INDEX TABLESPACE clause for PRIMARY KEY and UNIQUE
constraints.  Christopher Kings-Lynne.
2004-08-02 04:28:29 +00:00
Peter Eisentraut ee2bfaa3aa Translation updates (zh_TW converted to UTF-8) 2004-08-01 17:54:22 +00:00
Bruce Momjian b6a40d895e Small pg_config.c cleanup. 2004-08-01 14:01:36 +00:00
Bruce Momjian 72e7f0d48a Add missing file. 2004-08-01 13:54:05 +00:00