Commit Graph

2926 Commits

Author SHA1 Message Date
Peter Eisentraut 7babccb915 Add the possibility to specify an explicit validator function for foreign-data
wrappers (similar to procedural languages).  This way we don't need to retain
the nearly empty libraries, and we are more free in how to implement the
wrapper API in the future.
2009-02-24 10:06:36 +00:00
Tom Lane 7de7876cd5 Fix psql's \dD to show only one row per domain, even when the domain has
multiple check constraints.
2009-02-23 15:59:55 +00:00
Andrew Dunstan fae3083c3b Reconnect to the right database when using parallel restore with -C. Fixes bug reported by Olivier Prenant 2009-02-20 02:57:21 +00:00
Bruce Momjian 36a9cf38c5 Add --freeze option to vacuumdb. 2009-02-18 12:11:55 +00:00
Bruce Momjian 1d88d4e2c0 Have pg_dump/pg_dumpall --binary-upgrade restore frozenids for relations
and databases.
2009-02-18 12:07:08 +00:00
Bruce Momjian 5c89839ab2 Add missing newline. 2009-02-17 22:32:54 +00:00
Bruce Momjian 6883c54a62 Add pg_dump --binary-upgrade flag to be used by binary upgrade
utilities.

The new code allows transfer of dropped column information to the
upgraded server.
2009-02-17 15:41:50 +00:00
Bruce Momjian d665ed5c21 Wrap some long queries. 2009-02-16 23:06:55 +00:00
Bruce Momjian 98ffcb66cb Uppercase keywords in pg_dump.c 2009-02-16 22:50:41 +00:00
Alvaro Herrera 787020fd3d Improve psql \d+ to show TOAST reloptions too. Per complaint from
ITAGAKI Takahiro.
2009-02-11 19:12:04 +00:00
Andrew Dunstan 775f1b379e Provide for parallel restoration from a custom format archive. Each data and
post-data step is run in a separate worker child (a thread on Windows, a child
process elsewhere) up to the concurrent number specified by the new pg_restore
command-line --multi-thread | -m switch.

Andrew Dunstan, with some editing by Tom Lane.
2009-02-02 20:07:37 +00:00
Alvaro Herrera 3a5b773715 Allow reloption names to have qualifiers, initially supporting a TOAST
qualifier, and add support for this in pg_dump.

This allows TOAST tables to have user-defined fillfactor, and will also
enable us to move the autovacuum parameters to reloptions without taking
away the possibility of setting values for TOAST tables.
2009-02-02 19:31:40 +00:00
Magnus Hagander 1ab7dc0630 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:37 +00:00
Peter Eisentraut 5fe3da927b Revert updatable views 2009-01-27 12:40:15 +00:00
Tom Lane 3cb5d6580a Support column-level privileges, as required by SQL standard.
Stephen Frost, with help from KaiGai Kohei and others
2009-01-22 20:16:10 +00:00
Peter Eisentraut dd7e54a17f Automatic view update rules
Bernd Helmle
2009-01-22 17:27:55 +00:00
Bruce Momjian 71928e7b9f Make psql \d and \dt consistent for system tables, i.e prevent \d from
showing system tables, make \dS pattern show system table details, and
have \dtS show system and _user_ tables, to be consistent with other \d*
commands.
2009-01-20 02:13:42 +00:00
Bruce Momjian 2384287f6d Document RELKIND_SPECIAL reference in psql, from <= 8.1.X. 2009-01-19 18:44:32 +00:00
Tom Lane 390081e3f5 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:45 +00:00
Peter Eisentraut cc02b5eff1 Remove period from primary error message. 2009-01-15 22:33:19 +00:00
Magnus Hagander 3a819b0780 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:44:56 +00:00
Bruce Momjian d00a3472cf Update MinGW so it handles fseeko() similar to Unix. 2009-01-07 03:39:33 +00:00
Bruce Momjian 7e518a3d01 Removeduplicate \dd psql help mention. 2009-01-07 03:05:26 +00:00
Bruce Momjian 3084a8aea3 Add spaces around psql \d* columns, per idea from Joshua Drake. 2009-01-07 00:05:28 +00:00
Bruce Momjian 17f601ecb2 Improve \z psql \? help display. 2009-01-06 23:09:56 +00:00
Bruce Momjian f5ed2ee533 Add documentation for new \d*S* patch, and clean up some of the docs.
Fix \do and trigger display for the patch too.
2009-01-06 23:01:57 +00:00
Bruce Momjian 9491c82f71 This makes all the \dX commands (most importantly to most: \df) work
like \dt does, in that it requires a \dXS to see system items.

Greg Sabino Mullane
2009-01-06 21:10:30 +00:00
Bruce Momjian 32695413f3 Make pg_dump and pg_dumpall --clean options match the SGML docs, for consistency. 2009-01-06 18:01:57 +00:00
Bruce Momjian 6715642000 Update pg_restore --help text to match the SGML documentation. 2009-01-06 17:18:11 +00:00
Tom Lane b0a6ad70a1 Add a --role option to pg_dump, pg_dumpall, and pg_restore. This allows
performing dumps and restores in accordance with a security policy that
forbids logging in directly as superuser, but instead specifies that you
should log into an admin account and then SET ROLE to the superuser.

In passing, clean up some ugly and mostly-broken code for quoting shell
arguments in pg_dumpall.

Benedek László, with some help from Tom Lane
2009-01-05 16:54:37 +00:00
Peter Eisentraut 26af72b46b Allow out-of-tree builds on mingw and cygwin
Author: Richard Evans <richard.evans@blueallegro.net>
2009-01-05 09:27:20 +00:00
Bruce Momjian 511db38ace Update copyright for 2009. 2009-01-01 17:24:05 +00:00
Tom Lane eb273743ed Fix another problem in SQL-MED \d displays: should have a clean failure
report if the command is attempted against an old server.
2008-12-31 18:33:03 +00:00
Tom Lane 6672daace1 Consistently use multi-line formatting for all ACL columns printed by psql's
various display commands, not only for \z.

In passing, fix some infelicities in the newly added \d commands for SQL-MED
catalogs.

Andreas Scherbaum and Tom Lane
2008-12-31 18:07:47 +00:00
Tom Lane 26ce4e85a1 Add a WINDOW attribute to CREATE FUNCTION, and teach pg_dump about it,
so that user-defined window functions are possible.  For the moment you'll
have to write them in C, for lack of any interface to the WindowObject API
in the available PLs, but it's better than no support at all.

There was some debate about the best syntax for this.  I ended up choosing
the "it's an attribute" position --- the other approach will inevitably be
more work, and the likely market for user-defined window functions is
probably too small to justify it.
2008-12-31 02:25:06 +00:00
Peter Eisentraut cae565e503 SQL/MED catalog manipulation facilities
This doesn't do any remote or external things yet, but it gives modules
like plproxy and dblink a standardized and future-proof system for
managing their connection information.

Martin Pihlak and Peter Eisentraut
2008-12-19 16:25:19 +00:00
Alvaro Herrera 1eec10a2de Have psql's \d+ print reloptions. Extracted from Euler Taveira de Oliveira's
reloptions patch for autovacuum and revised by me.

Note that there doesn't seem to be a way to display an index's reloptions.
2008-12-19 14:39:58 +00:00
Tom Lane 517ae4039e Code review for function default parameters patch. Fix numerous problems as
per recent discussions.  In passing this also fixes a couple of bugs in
the previous variadic-parameters patch.
2008-12-18 18:20:35 +00:00
Peter Eisentraut 218b4e8dd8 Append major version number and for libraries soname major version number
to the gettext domain name, to simplify parallel installations.

Also, rename set_text_domain() to pg_bindtextdomain(), because that is what
it does.
2008-12-11 07:34:09 +00:00
Peter Eisentraut b2971e2048 Set up ar, dlltool, dllwrap, and windres for cross-compiling if necessary.
Plus some makefile cleanup.

part of a patch from Richard Evans
2008-12-07 08:36:22 +00:00
Peter Eisentraut 455dffbb73 Default values for function arguments
Pavel Stehule, with some tweaks by Peter Eisentraut
2008-12-04 17:51:28 +00:00
Tom Lane 739259d62e Adjust the behavior of the PQExpBuffer code to make it have well-defined
results (ie, an empty "broken" buffer) if memory overrun occurs anywhere
along the way to filling the buffer.  The previous coding would just silently
discard portions of the intended buffer contents, as exhibited in trouble
report from Sam Mason.  Also, tweak psql's main loop to correctly detect
and report such overruns.  There's probably much more that should be done
in this line, but this is a start.
2008-11-26 00:26:23 +00:00
Peter Eisentraut a378555501 CLUSTER VERBOSE and corresponding clusterdb --verbose option
Jim Cox and Peter Eisentraut
2008-11-24 08:46:04 +00:00
Magnus Hagander 822f26069e Fix a few more format argument warnings. 2008-11-21 20:14:27 +00:00
Peter Eisentraut b09a1a2942 TABLE command 2008-11-20 14:04:46 +00:00
Peter Eisentraut 8b4da40487 Change this script to Perl 5 style. Add support for multiple refnames.
Sort the output by command name.  This previously only worked by source
file name, which doesn't always match the command name exactly.  And it
certainly won't work for multiple refnames.
2008-11-19 09:51:55 +00:00
Tom Lane 5c9c08d250 One more hack to see if we can get the cygwin machines building again.
This continues the saga of trying to get PGDLLIMPORT to work in pg_crc.h
in both backend and frontend environments.
2008-11-14 21:45:07 +00:00
Tom Lane 81e11f2d05 Actually, instead of whining about how type internal might not safely store
a pointer, why don't we just fix that.  Every known use of "internal" really
means a pointer anyway.
2008-11-14 02:09:52 +00:00
Magnus Hagander ccc9073f26 Make psql report "SSL connection (unknown cipher)" when libpq has set
up a SSL connection, but psql is compiled without support for it.

Not a really realistic use-case, but the patch also cuts down on
the number of places with #ifdef's...
2008-11-11 15:01:53 +00:00
Tom Lane a4917bef0e Add support for input and output of interval values formatted per ISO 8601;
specifically, we can input either the "format with designators" or the
"alternative format", and we can output the former when IntervalStyle is set
to iso_8601.

Ron Mayer
2008-11-11 02:42:33 +00:00