Commit Graph

433 Commits

Author SHA1 Message Date
Tom Lane 15162aef24 Make dumpACL behave more reasonably for case where owner has revoked
some of his own privileges.
2002-05-06 18:33:45 +00:00
Tom Lane 340b66cc70 Cause fmtId to always use its internal buffer for the returned value,
in hopes of making erroneous usage more apparent.  Per discussion 15-Apr.
2002-05-06 17:34:45 +00:00
Tom Lane 8d615763da Add missing 'static' keyword to suppress compiler complaints.
gcc does not complain about this mistake, but other compilers do.
2002-04-29 17:30:18 +00:00
Tom Lane e896912ee9 Remove unnecessary/obsolete regproctooid() references. 2002-04-29 04:10:02 +00:00
Peter Eisentraut ed8aa9711e Remove references to NAMEDATALEN and INDEX_MAX_KEYS from pg_dump. Handles
any size now.
2002-04-24 22:39:49 +00:00
Bruce Momjian 8be68479dc Remove compile warnings for lo dump by casting to char *. 2002-04-24 14:03:22 +00:00
Bruce Momjian 5b0fb008e7 The attached patch cleans up some code in pg_dump. It cuts some
unused function arguments, and makes the TableInfo struct slightly
smaller by removing an unnecessary member.

Neil Conway <neilconway@rogers.com>
2002-04-24 02:44:19 +00:00
Bruce Momjian 244693744f Update patch for DEFAULT on Views.
Apparently, you need to make two calls to appendPQExpBuffer() to
use fmtId() twice, because it uses a static buffer (thanks for
spotting this Tom).

Another revision of the patch is attached.

Neil Conway <neilconway@rogers.com>
2002-04-24 02:42:27 +00:00
Bruce Momjian adf7cc04cb Doc fix for INSERT ... (DEFAULT, ...)
Appears I forgot to update the docs earlier.

Rod Taylor
2002-04-24 02:38:58 +00:00
Bruce Momjian e975123454 Speed improvement for large object restore.
Mario Weilguni
2002-04-24 02:21:04 +00:00
Peter Eisentraut d433a3628e Make pg_dump independent of FUNC_MAX_ARGS. 2002-04-21 05:21:18 +00:00
Tom Lane 6d6ca2166c Change naming rule for ON SELECT rules of views: they're all just
_RETURN now, since there's no need to keep 'em unique anymore.
2002-04-19 23:13:54 +00:00
Tom Lane b3120804ad Rule names are now unique per-relation, rather than unique globally.
DROP RULE and COMMENT ON RULE syntax adds an 'ON tablename' clause,
similar to TRIGGER syntaxes.  To allow loading of existing pg_dump
files containing COMMENT ON RULE, the COMMENT code will still accept
the old syntax --- but only if the target rulename is unique across
the whole database.
2002-04-18 20:01:11 +00:00
Bruce Momjian 7603c42edf Rod's patch does what it is supposed to do, but it also includes
some old code to add PK constraints to CREATE TABLE. That stuff
had been removed as part of my original patch for pg_dump a
little while ago.

The attached patch fixes this by removing (again :-) ) the
code in dumpTables() to perform PK creation during CREATE
TABLE. I briefly tested it locally and it fixes both of
Tom's test cases.

Please apply.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
2002-04-13 19:57:18 +00:00
Bruce Momjian 5804a7ce3e Allow dropdb and others to use identifiers with spaces; IFS cleanup for
pg_dumpall.
2002-04-12 09:37:11 +00:00
Bruce Momjian 0c9790e616 Cleanup in use of IFS. 2002-04-11 21:22:27 +00:00
Bruce Momjian 2dd06b0593 Make sure leading/trailing/multiple consecutive space/tab in db/user/group
names are handled OK.
2002-04-11 21:16:28 +00:00
Tom Lane 902a6a0a4b Restructure representation of aggregate functions so that they have pg_proc
entries, per pghackers discussion.  This fixes aggregates to live in
namespaces, and also simplifies/speeds up lookup in parse_func.c.
Also, add a 'proimplicit' flag to pg_proc that controls whether a type
coercion function may be invoked implicitly, or only explicitly.  The
current settings of these flags are more permissive than I would like,
but we will need to debate and refine the behavior; for now, I avoided
breaking regression tests as much as I could.
2002-04-11 20:00:18 +00:00
Bruce Momjian 3f6299df6c Fix pg_upgrade to handle dbnames, user/group names with spaces. 2002-04-11 19:23:36 +00:00
Bruce Momjian a62f43ae6e Fix problem with invalid database name assignment in while loop.
Properly warn of invalid pg_dumpall options;  minor quoting cleanups.
2002-04-11 04:56:21 +00:00
Bruce Momjian 9f20765919 Adds domain dumping support to pg_dump.
Rod Taylor
2002-04-05 11:51:13 +00:00
Tom Lane 4bdb4be62e Divide functions into three volatility classes (immutable, stable, and
volatile), rather than the old cachable/noncachable distinction.  This
allows indexscan optimizations in many places where we formerly didn't.
Also, add a pronamespace column to pg_proc (it doesn't do anything yet,
however).
2002-04-05 00:31:36 +00:00
Bruce Momjian c52670e8b2 Fix pg_dump help option alignment. 2002-03-21 05:47:14 +00:00
Bruce Momjian 5b5cef9abd Enable ALTER TABLE ADD PRIMARY KEY for pg_dump, for performance reasons
so index is not on table during COPY.

> > AFAICT, the patch I posted to -patches a little while to enable the
> > usage of ALTER TABLE ADD PRIMARY KEY by pg_dump hasn't been applied, nor
> > is it in the unapplied patches list. I was under the impression that
> > this was in the queue for application -- did it just get lost?

Neil Conway <neilconway@rogers.com>
2002-03-06 20:48:42 +00:00
Tom Lane af1b72d83b #ifdef out pg_dump's check on whether a sequence's sequence_name field
matches the sequence name from pg_class.  This fails if the sequence has
been renamed, and seems rather pointless in any case.
Also improve a couple of error messages about inconsistencies.
2002-02-27 20:59:05 +00:00
Tom Lane 36d2cc1d57 Modify pg_dumpall so that output script uses new OWNER option of CREATE
DATABASE; also make it use SET SESSION AUTHORIZATION commands rather than
\connect commands.  This makes it possible to restore databases belonging
to users who do not have CREATEDB privilege.  It should also become at
least somewhat feasible to run the restore script under password
authentication --- you'll get one superuser password prompt per database,
rather than a large number of challenges for passwords belonging to
varying unspecified user names.
2002-02-24 21:57:23 +00:00
Tom Lane 15c30b6f9a Be more wary about mixed-case database names and user names. Get
the CREATE DATABASE command right in pg_dump -C case.
2002-02-11 00:18:20 +00:00
Tom Lane 6a67d9def0 Fix failure to reconnect as sequence's owner before issuing setval(). 2002-02-06 17:27:50 +00:00
Peter Eisentraut b84bebfc09 update 2002-01-29 20:39:49 +00:00
Peter Eisentraut 0d6813df4e Updates from Serguei Mokhov 2002-01-26 19:00:11 +00:00
Tom Lane 1b68bcfad3 Tweak pg_dump to say GRANT ALL when appropriate, rather than enumerating
the individual privilege bits.  I regard this as an important change for
cross-version compatibility: without this, a 7.1 dump loaded into 7.2
is likely to be short a few privileges.
2002-01-25 18:49:31 +00:00
Bruce Momjian 69f909ba10 You might want to run pg_indent on pg_backup_db.c however ...
tom lane
2002-01-18 19:17:05 +00:00
Tom Lane bb698c25c7 Fix pg_restore to handle the 'set max oid' entry correctly in archives
dumped by pg_dump -o.  Per bug report posted by Bruce; fix is from
Philip Warner, reviewed by Tom Lane.
2002-01-18 17:13:51 +00:00
Tom Lane 7e1d82040e pg_upgrade doesn't live here anymore. Remove dangling references. 2002-01-15 05:05:49 +00:00
Bruce Momjian 50c9557500 Remove old pg_upgrade script, from Tom. 2002-01-15 04:52:33 +00:00
Bruce Momjian 1b5d8e6d5c Fix recreation of sequence files for 7.2 also because of XID change from
beta4 to beta5.
2002-01-13 17:52:00 +00:00
Bruce Momjian 4b20cc1032 Now works for 7.1 databases. 2002-01-13 05:36:42 +00:00
Bruce Momjian 11b3e56223 Now tested on 7.2->7.2 migration; still disabled. Need 7.1 testing now. 2002-01-13 04:55:44 +00:00
Bruce Momjian 9be030fbeb Keep it disabled. 2002-01-13 01:22:27 +00:00
Bruce Momjian 5b2ebe95e9 Wow, it actually worked for the regression database. More testing needed. 2002-01-13 01:13:59 +00:00
Tom Lane 0e1a5075fd Fix pg_dump to read-lock all tables to be dumped as soon as it's read
their names from pg_class.  This considerably reduces the window wherein
someone could DROP or ALTER a table that pg_dump is intending to dump.
Not a perfect solution, but definitely an improvement.  Per complaints
from Marc Fournier; patch by Brent Verner with some kibitzing by Tom Lane.
2002-01-11 23:21:55 +00:00
Bruce Momjian 3bb77555b1 Sync up. 2002-01-11 20:34:14 +00:00
Bruce Momjian 4e37786f2f More testing, more cleanups. 2002-01-11 06:48:41 +00:00
Bruce Momjian 37c9346ef2 pg_resetxlog specifies log location in hex; more pg_upgrade testing
improvments.
2002-01-11 06:33:01 +00:00
Bruce Momjian ba3231a2a0 More cleanups. 2002-01-11 06:08:02 +00:00
Bruce Momjian 3b3b730728 More updates for int8 sequence restoration. Old dump file not required
anymore.
2002-01-11 05:54:59 +00:00
Bruce Momjian 6bd45e5264 Handle int4-int8 sequence migration without full data dump. 2002-01-11 04:39:19 +00:00
Bruce Momjian 5370cd6b03 More improvements using pg_resetxlog. still disabled. 2002-01-11 00:27:42 +00:00
Bruce Momjian 7a0672b7b1 More pg_upgrade improvements. Almost done, except for max transaction
setting.
2002-01-10 04:58:19 +00:00
Bruce Momjian 4d151d0b12 More improvements; still disabled. (Don't panic.) 2002-01-10 03:05:48 +00:00