summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/dumputils.c
AgeCommit message (Collapse)Author
2007-01-04Tweak pg_dumpall to add GRANT CONNECT ON DATABASE ... TO PUBLIC when dumpingTom Lane
database privileges from a pre-8.2 server. This ensures that the reloaded database will maintain the same behavior it had in the previous installation, ie, everybody has connect privilege. Per gripe from L Bayuk.
2006-10-09Move processNamePattern into dumputils.c in preparation for using it inTom Lane
pg_dump as well as psql. Since psql already uses dumputils.c, while there's not any code sharing in the other direction, this seems the easiest way. Also, fix misinterpretation of patterns using regex | by adding parentheses (same bug found previously in similar_escape()). This should be backpatched.
2006-10-04pgindent run for 8.2.Bruce Momjian
2006-09-08Fix pg_dump for recent change removing separate RULE privilege.Tom Lane
I had thought this code could be left alone, but I was wrong: as-is it's failing to recognize when to use ALL for table privileges in 8.2.
2006-06-01Fix up hack to suppress escape_string_warning so that it actually worksTom Lane
and there's only one place that's a kluge, ie, appendStringLiteralConn. Note that pg_dump itself doesn't use appendStringLiteralConn, so its behavior is not affected; only the other utility programs care.
2006-05-28Fix up pg_dump to do string escaping fully correctly for client encodingTom Lane
and standard_conforming_strings; likewise for the other client programs that need it. As per previous discussion, a pg_dump dump now conforms to the standard_conforming_strings setting of the source database. We don't use E'' syntax in the dump, thereby improving portability of the SQL. I added a SET escape_strings_warning = off command to keep the dumps from getting a lot of back-chatter from that.
2006-05-26Use E'' strings internally only when standard_conforming_strings =Bruce Momjian
'off'. This allows pg_dump output with standard_conforming_strings = 'on' to generate proper strings that can be loaded into other databases without the backslash doubling we typically do. I have added the dumping of the standard_conforming_strings value to pg_dump. I also added standard backslash handling for plpgsql.
2006-04-30Code review for GRANT CONNECT patch. Spell the privilege as CONNECT notTom Lane
CONNECTION, fix a number of places that were missed (eg pg_dump support), avoid executing an extra search of pg_database during startup.
2006-03-05Update copyright for 2006. Update scripts.Bruce Momjian
2006-01-21Add GRANT ON SEQUENCE syntax to support sequence-only permissions.Bruce Momjian
Continue to support GRANT ON [TABLE] for sequences for backward compatibility; issue warning for invalid sequence permissions. [Backward compatibility warning message.] Add USAGE permission for sequences that allows only currval() and nextval(), not setval(). Mention object name in grant/revoke warnings because of possible multi-object operations.
2006-01-11Brace cleanup.Bruce Momjian
2005-12-03Treat procedural languages as owned by the bootstrap superuser, ratherTom Lane
than owned by nobody. This results in cleaner display of language ACLs, since the backend's aclchk.c uses the same convention. AFAICS there is no practical difference but it's nice to avoid emitting SET SESSION AUTHORIZATION; also this will make it easier to transition pg_dump to some future version in which we may include an explicit ownership column in pg_language. Per gripe from David Begley.
2005-12-02Fix obsolete comment.Tom Lane
2005-11-22Re-run pgindent, fixing a problem where comment lines after a blankBruce Momjian
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-07-02Add E'' to internally created SQL strings that contain backslashes.Bruce Momjian
Improve code clarity by using macros for E'' processing.
2005-07-01Add code to pg_dump to use E'' strings when backslashes are used in dumpBruce Momjian
files.
2005-04-30GCC 4.0 includes a new warning option, -Wformat-literal, that emitsNeil Conway
a warning when a variable is used as a format string for printf() and similar functions (if the variable is derived from untrusted data, it could include unexpected formatting sequences). This emits too many warnings to be enabled by default, but it does flag a few dubious constructs in the Postgres tree. This patch fixes up the obvious variants: functions that are passed a variable format string but no additional arguments. Most of these are harmless (e.g. the ruleutils stuff), but there is at least one actual bug here: if you create a trigger named "%sfoo", pg_dump will read uninitialized memory and fail to dump the trigger correctly.
2004-12-31Tag appropriate files for rc3PostgreSQL Daemon
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-08-29Pgindent run for 8.0.Bruce Momjian
2004-08-29Update copyright to 2004.Bruce Momjian
2004-06-18Tablespaces. Alternate database locations are dead, long live tablespaces.Tom Lane
There are various things left to do: contrib dbsize and oid2name modules need work, and so does the documentation. Also someone should think about COMMENT ON TABLESPACE and maybe RENAME TABLESPACE. Also initlocation is dead, it just doesn't know it yet. Gavin Sherry and Tom Lane.
2004-03-23Use dollar-quoting for function bodies, unless disabled withTom Lane
--disable-dollar-quoting. Andrew Dunstan
2004-01-07pg_dump support for function parameter names.Tom Lane
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-08-14Handle double-quotes correctly in user names in ACL lists.Tom Lane
Christopher Kings-Lynne
2003-08-04Update copyrights to 2003.Bruce Momjian
2003-08-04pgindent run.Bruce Momjian
2003-07-31Upgrade parsing code for ACLs to be less hokey and more cognizant ofTom Lane
the actual logical structure and quoting rules being used. Fixes bug reported by Chris K-L on 7/8/03.
2003-07-24Fix grant option dumping and related cross-version compatibility issues.Peter Eisentraut
2003-05-30Cause pg_dumpall to include GRANT/REVOKE for database-level permissionsTom Lane
in its output. Make it work with server versions back to 7.0, too.
2002-09-07Allow pg_dumpall to work with previous releases again. Don't pass the -cPeter Eisentraut
option down to pg_dump, where it's useless, and clarify the meaning of -c in the documentation.
2002-09-04pgindent run.Bruce Momjian
2002-08-27Reimplement pg_dumpall in C. Currently no change in functionality,Peter Eisentraut
except that it's more robust, reconnects less often, and is NLS'ed.