Commit Graph

2784 Commits

Author SHA1 Message Date
095f7ba339 Translation updates 2009-09-03 19:25:46 +00:00
bcdb578895 Fix pg_ctl's readfile() to not go into infinite loop on an empty file
(could happen if either postgresql.conf or postmaster.opts is empty).
It's been broken since the C version was written for 8.0, so patch
all the way back.

initdb's copy of the function is broken in the same way, but it's
less important there since the input files should never be empty.
Patch that in HEAD only, and also fix some cosmetic differences that
crept into that copy of the function.

Per report from Corry Haines and Jeff Davis.
2009-09-02 02:41:07 +00:00
b040178c11 Fix inclusions of readline/editline header files so that we only attempt to
#include the version of history.h that is in the same directory as the
readline.h we are using.  This avoids problems in some scenarios where both
readline and editline are installed.  Report and patch by Zdenek Kotala.
2009-08-24 16:18:25 +00:00
d9a00ebbba Try to defend against the possibility that libpq is still in COPY_IN state
when we reach the post-COPY "pump it dry" error recovery code that was added
2006-11-24.  Per a report from Neil Best, there is at least one code path
in which this occurs, leading to an infinite loop in code that's supposed
to be making it more robust not less so.  A reasonable response seems to be
to call PQputCopyEnd() again, so let's try that.

Back-patch to all versions that contain the cleanup loop.
2009-08-07 20:16:22 +00:00
4df4ffe326 Fix pg_resetxlog to remove archive status files along with WAL segment files.
Fujii Masao
2009-05-03 23:13:44 +00:00
591cbf673b Improve pg_dump's query for retrieving BLOB comments to be more efficient
when there are many blobs and not so many comments.  Tamas Vincze
2009-04-01 18:54:33 +00:00
9a427cde74 Don't crash initdb when we fail to get the current username.
Give an error message and exit instead, like we do elsewhere...

Per report from Wez Furlong and Robert Treat.
2009-03-31 18:58:38 +00:00
f14ce2124d Fix tab completion of ANALYZE VERBOSE <tab>. It was previously confused
with EXPLAIN ANALYZE VERBOSE.

Greg Sabino Mullane, reformatted by myself. Backpatch to 8.1, where the
bug was introduced.
2009-03-27 14:58:54 +00:00
612cc940dc Translation updates 2009-01-29 22:07:53 +00:00
5b82d268e4 Support running as a service on Windows 7, by not specifying
the JOB_OBJECT_UILIMIT_HANDLES flag.

Dave Page & Magnus Hagander
2009-01-28 11:19:40 +00:00
ff8f86e7a1 Fix a pg_dump output ordering problem introduced in 8.3 by the addition of
array types for composite types.  Although pg_dump understood it wasn't
supposed to dump these array types as separate objects, it must include
them in the dependency ordering analysis, and it was improperly assigning them
the same relatively-high sort priority as regular types.  This resulted in
effectively moving composite types and tables up to that same high priority,
which broke any ordering requirements that weren't explicitly enforced by
dependencies.  In particular user-defined operator classes, which should come
out before tables, failed to do so.  Per report from Brendan Jurd.

In passing, also fix an ill-considered decision to give text search objects
the same sort priority as functions and operators --- the sort result looks
a lot nicer if different object types are kept separate.  The recent
foreign-data patch had copied that decision, making the sort ordering even
messier :-(
2009-01-18 20:44:53 +00:00
4d4b0f3521 Throw an error when using -C and -1 at the same time in pg_restore.
It's not possible to do CREATE DATABASE inside a transaction, so previously
we just got a server error instead.

Backpatch to 8.2, which is where the -1 feature appeared.
2009-01-13 11:45:03 +00:00
b7c5f65df5 Translation updates 2008-10-30 21:30:20 +00:00
a1bbfa78b4 Improve new message 2008-10-30 08:51:13 +00:00
57a2091013 Recent patches to pg_ctl broke "pg_ctl restart" for the case where no
command-line options had been given to the postmaster; and just plain
broke it altogether in 8.1 and 8.0.  Per report from KaiGai Kohei.
2008-09-30 13:14:07 +00:00
7898ff7185 Make sure pg_control is opened in binary mode, to deal
with situtations when the file contains an EOF maker
(0x1A) on Windows.

ITAGAKI Takahiro
2008-09-24 08:59:46 +00:00
4dff669cf0 Fix pg_dump/pg_restore's ExecuteSqlCommand() to behave suitably if PQexec
returns NULL instead of a PGresult.  The former coding would fail, which
is OK, but it neglected to give you the PQerrorMessage that might tell
you why.  In the oldest branches, there was another problem: it'd sometimes
report PQerrorMessage from the wrong connection.
2008-08-16 02:25:11 +00:00
ac9562eca7 Fix 'pg_ctl reload' to properly preserve postmaster commend-line
arguments on restart.  Patch to releases 8.0 - 8.3.X.
2008-06-27 01:53:31 +00:00
2d2896507b Translation updates. 2008-06-05 23:36:45 +00:00
bc0c7e9876 Fix initdb to reject a relative path for -X (--xlogdir) argument. This
doesn't work, and the real reason why not is it's unclear where the path
is relative to (initdb's CWD, or the data directory?).  We could make an
arbitrary decision, but it seems best to make the user be unambiguous.
Per gripe from Devrim.
2008-06-02 03:48:07 +00:00
8146f890bb Make 8.3.x psql print tab characters as an appropriate number of spaces,
rather than "\x09".  Before 8.3 we just printed tabs as-is, leading to poor
formatting of subsequent columns, but consensus is that "\x09" is not an
improvement over that.  Back-patch of fix that's already in HEAD.
2008-05-29 19:34:44 +00:00
1c0e618e17 Include \password in the psql help.
While at it, change the order of the documented options to be
alphabetically again.
2008-03-26 15:52:36 +00:00
c666edb5eb Translation updates 2008-03-14 04:46:30 +00:00
da956ae76f Don't call AddUserToDacl on Cygwin 2008-02-29 23:31:42 +00:00
b739491552 Fix handling of restricted processes for Windows Vista (mainly),
by explicitly adding back the user to the DACL of the new process.
This fixes the failure case when executing as the Administrator
user, which had no permissions left at all after we dropped the
Administrators group.

Dave Page with some modifications from me
2008-02-29 15:31:41 +00:00
e2f86a5c45 Fix mistakes in pg_ctl's code for "start -w" that tries to cope with
non-default settings for the postmaster's port number.  The code to parse
command line options and postgresql.conf entries wasn't quite right about
whitespace or quotes, and it was coded in a not-very-readable way too.
Per bug #3969 from Itagaki Takahiro, though this is more extensive than his
proposed patch (which fixed only the whitespace problem).
This code has been broken since it was put in in 8.0, so patch all the way
back.
2008-02-20 22:18:20 +00:00
3c9ae7300d Translation updates 2008-01-31 18:04:52 +00:00
47df4f6688 Add a GUC variable "synchronize_seqscans" to allow clients to disable the new
synchronized-scanning behavior, and make pg_dump disable sync scans so that
it will reliably preserve row ordering.  Per recent discussions.
2008-01-30 18:35:55 +00:00
6dfa40d69f Translation updates 2008-01-30 11:05:41 +00:00
6f8f8d2daa Provide a clearer error message if the pg_control version number looks
wrong because of mismatched byte ordering.
2008-01-21 11:17:46 +00:00
f7108ce06b Fix psql \h output for case of no parameters (ie, list all the known commands)
to format properly for the actually needed column width, instead of having
a hard-wired assumption about the longest command name length.  Also make it
respond to the current screen width.  In passing, const-ify the constant
table.
2008-01-20 21:13:55 +00:00
ea00ab8d64 Prevent pg_dump from dumping the comment (if any) on the 'public' schema.
This is to avoid uselessly requiring superuser permissions to restore
the dump without errors.  Pretty grotty, but no better alternative seems
available, at least not in the near term.
2008-01-14 19:27:41 +00:00
9098ab9e32 Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
8621c2f6e8 Get dllwrap name from variable instead of hardcoded.
Per complaint from Richard Evans
2007-12-15 16:21:35 +00:00
df4271fedd Improve the method of localizing column names and other fixed strings in
psql's \d commands and other uses of printQuery().  Previously we would pass
these strings through gettext() and then send them to the server as literals
in the SQL query.  But the code was not set up to handle doubling of quotes in
the strings, causing failure if a translation attempted to use the wrong kind
of quote marks, as indeed is now the case for (at least) the French
translation of \dFp.  Another hazard was that gettext() would translate to
whatever encoding was implied by the client's LC_CTYPE setting, which might be
different from the client_encoding setting, which would probably cause the
server to reject the query as mis-encoded.  The new arrangement is to send the
untranslated ASCII strings to the server, and do the translations inside
printQuery() after the query results come back.  Per report from Guillaume
Lelarge and subsequent discussion.
2007-12-12 21:41:47 +00:00
1ebff9ba81 Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
1161f1ae14 Remove the long-deprecated -u option from psql, since it does nothing very
useful and confuses people who think it is the same as -U.  (Eventually
we might want to re-introduce it as being an alias for -U, but that should
not happen until the switch has actually not been there for a few releases.)
Likewise in pg_dump and pg_restore.  Per gripe from Robert Treat and
subsequent discussion.
2007-12-11 19:01:06 +00:00
e8191d9f23 Fix bogus prompt for password in -u case. Per gripe from Robert Treat. 2007-12-09 19:04:47 +00:00
4f9bf7fc5a Fix up the PQconnectionUsedPassword mess: create a separate
PQconnectionNeedsPassword function that tells the right thing for whether to
prompt for a password, and improve PQconnectionUsedPassword so that it checks
whether the password used by the connection was actually supplied as a
connection argument, instead of coming from environment or a password file.
Per bug report from Mark Cave-Ayland and subsequent discussion.
2007-12-09 19:01:40 +00:00
42a0c88ead Translation updates 2007-11-29 08:50:36 +00:00
3f9ef2bf8c Properly recognize and announce input errors. 2007-11-28 09:17:46 +00:00
229d406a9b Move resetting of currSchema to a spot where it's not vulnerable to getting
missed in possible future partial-drop scenarios.  Improve comment.
Per report from Zoltan Boszormenyi.
2007-11-24 20:26:49 +00:00
7ebbc815d9 If pg_dump drops a schema, make sure 'search_path' it SET the next time
it is needed --- basically don't remember the previous 'search_path'
after a drop schema because it might have failed but be created later.
2007-11-24 17:45:32 +00:00
b85cf684f7 Add more comments about thousands separator handling. 2007-11-22 17:51:39 +00:00
d9bc7a3946 Add comments about thousands separator logic. 2007-11-22 15:10:05 +00:00
3894e7cc55 When setting default thousands separator when locale has "", use logic
so new thousands separator doesn't match decimal symbol.
2007-11-21 22:28:18 +00:00
09a98e61c3 Fix pg_ctl -t to register -t value, per Alvaro. 2007-11-20 19:24:26 +00:00
eeb8677761 Update comment. 2007-11-19 23:48:33 +00:00
3b65c3b2e7 Add comment about COMMENT ON DATABASE failing for differently-named
databases.
2007-11-19 18:44:06 +00:00
015794541d Fix inconsistent message wording, and split off a couple of duplicated strings. 2007-11-16 21:47:32 +00:00