aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts
Commit message (Collapse)AuthorAge
* Move pqsignal() to libpgport.Tom Lane2013-03-17
| | | | | | | | | We had two copies of this function in the backend and libpq, which was already pretty bogus, but it turns out that we need it in some other programs that don't use libpq (such as pg_test_fsync). So put it where it probably should have been all along. The signal-mask-initialization support in src/backend/libpq/pqsignal.c stays where it is, though, since we only need that in the backend.
* Add fe_memutils.c to nls.mk where usedPeter Eisentraut2013-03-06
|
* Create libpgcommon, and move pg_malloc et al to itAlvaro Herrera2013-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | libpgcommon is a new static library to allow sharing code among the various frontend programs and backend; this lets us eliminate duplicate implementations of common routines. We avoid libpgport, because that's intended as a place for porting issues; per discussion, it seems better to keep them separate. The first use case, and the only implemented by this patch, is pg_malloc and friends, which many frontend programs were already using. At the same time, we can use this to provide palloc emulation functions for the frontend; this way, some palloc-using files in the backend can also be used by the frontend cleanly. To do this, we change palloc() in the backend to be a function instead of a macro on top of MemoryContextAlloc(). This was previously believed to cause loss of performance, but this implementation has been tweaked by Tom and Andres so that on modern compilers it provides a slight improvement over the previous one. This lets us clean up some places that were already with localized hacks. Most of the pg_malloc/palloc changes in this patch were authored by Andres Freund. Zoltán Böszörményi also independently provided a form of that. libpgcommon infrastructure was authored by Álvaro.
* scripts: Add build prerequisite on libpgportPeter Eisentraut2013-02-08
| | | | | | | | Without this, building in src/bin/scripts directly will fail if libpgport wasn't built first. Other bin components are handled the same way. Phil Sorber
* Make it easy to time out pg_isready, and make the default 3 seconds.Robert Haas2013-01-25
| | | | | | Along the way, add a missing line to the help message. Phil Sorber, reviewed by Fujii Masao
* pg_isreadyRobert Haas2013-01-23
| | | | | | | New command-line utility to test whether a server is ready to accept connections. Phil Sorber, reviewed by Michael Paquier and Peter Eisentraut
* Support multiple -t/--table arguments for more commandsMagnus Hagander2013-01-17
| | | | | | | | On top of the previous support in pg_dump, add support to specify multiple tables (by using the -t option multiple times) to pg_restore, clsuterdb, reindexdb and vacuumdb. Josh Kupershmidt, reviewed by Karl O. Pinc
* Update copyrights for 2013Bruce Momjian2013-01-01
| | | | | Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
* In our source code, make a copy of getopt's 'optarg' string arguments,Bruce Momjian2012-10-12
| | | | rather than just storing a pointer.
* Work around unportable behavior of malloc(0) and realloc(NULL, 0).Tom Lane2012-10-02
| | | | | | | | | | | | | | | | On some platforms these functions return NULL, rather than the more common practice of returning a pointer to a zero-sized block of memory. Hack our various wrapper functions to hide the difference by substituting a size request of 1. This is probably not so important for the callers, who should never touch the block anyway if they asked for size 0 --- but it's important for the wrapper functions themselves, which mistakenly treated the NULL result as an out-of-memory failure. This broke at least pg_dump for the case of no user-defined aggregates, as per report from Matthew Carrington. Back-patch to 9.2 to fix the pg_dump issue. Given the lack of previous complaints, it seems likely that there is no live bug in previous releases, even though some of these functions were in place before that.
* Standardize naming of malloc/realloc/strdup wrapper functions.Tom Lane2012-10-02
| | | | | | | | | | | | We had a number of variants on the theme of "malloc or die", with the majority named like "pg_malloc", but by no means all. Standardize on the names pg_malloc, pg_malloc0, pg_realloc, pg_strdup. Get rid of pg_calloc entirely in favor of using pg_malloc0. This is an essentially cosmetic change, so no back-patch. (I did find a couple of places where psql and pg_dump were using plain malloc or strdup instead of the pg_ versions, but they don't look significant enough to bother back-patching.)
* Fix "too many arguments" messages not to index off the end of argv[].Robert Haas2012-09-06
| | | | | This affects initdb, clusterdb, reindexdb, and vacuumdb in master and 9.2; in earlier branches, only initdb is affected.
* Make documentation of --help and --version options more consistentPeter Eisentraut2012-06-18
| | | | | | Before, some places didn't document the short options (-? and -V), some documented both, some documented nothing, and they were listed in various orders. Now this is hopefully more consistent and complete.
* Run pgindent on 9.2 source tree in preparation for first 9.3Bruce Momjian2012-06-10
| | | | commit-fest.
* Don't override arguments set via options with positional arguments.Andrew Dunstan2012-04-17
| | | | | | | | | A number of utility programs were rather careless about paremeters that can be set via both an option argument and a positional argument. This leads to results which can violate the Principal Of Least Astonishment. These changes refuse to use positional arguments to override settings that have been made via positional arguments. The changes are backpatched to all live branches.
* Improve connectMaintenanceDatabase() error reporting.Robert Haas2012-03-21
| | | | | | | | The prior coding instructs the user to pick an alternative maintenance database, but this is overly clever, since it obscures whatever the real cause of the failure is. Josh Kupershmidt
* createuser: Disable prompting by defaultPeter Eisentraut2012-02-07
| | | | | | | | | | Do not prompt when options were not specified. Assume --no-createdb, --no-createrole, --no-superuser by default. Also disable prompting for user name in dropdb, unless --interactive was specified. reviewed by Josh Kupershmidt
* Update copyright notices for year 2012.Bruce Momjian2012-01-01
|
* Make command-line tools smarter about finding a DB to connect to.Robert Haas2011-12-06
| | | | | | | | If unable to connect to "postgres", try "template1". This allows things to work more smoothly in the case where the postgres database has been dropped. And just in case that's not good enough, also allow the user to specify a maintenance database to be used for the initial connection, to cover the case where neither postgres nor template1 is suitable.
* Add --{no-,}replication flags to createuser.Robert Haas2011-09-23
| | | | Fujii Masao, reviewed by Cédric Villemain, with some doc changes by me.
* Remove double-quoting of table names in clusterdb. BACKWARD COMPABILITYBruce Momjian2011-09-10
| | | | | | | | | | BREAKAGE. Remove double-quoting of index/table names in reindexdb. BACKWARD COMPABILITY BREAKAGE. Document thate user/database names are preserved with double-quoting by command-line tools like vacuumdb.
* Adjust translator comment format to xgettext expectationsAlvaro Herrera2011-09-05
|
* Add --if-exists option to dropdb and dropuser.Robert Haas2011-08-30
| | | | Josh Kupershmidt, with some further editing by me.
* Add markers.Bruce Momjian2011-08-26
|
* Translation updatesPeter Eisentraut2011-08-17
|
* Unify spelling of "canceled", "canceling", "cancellation"Peter Eisentraut2011-06-29
| | | | | We had previously (af26857a2775e7ceb0916155e931008c2116632f) established the U.S. spellings as standard.
* Make _ be automatically included in GETTEXT_TRIGGERSPeter Eisentraut2011-06-26
| | | | | Since it's globally defined in c.h, it should be treated as a gettext trigger everywhere.
* Replace := by = in nls.mk filesPeter Eisentraut2011-06-26
| | | | | | | | It currently doesn't make a difference, but it's inconsistent with most other usage, and it might interfere with a future patch, so I'll change it all in a separate commit. Also, replace tabs with spaces for alignment.
* Translation updates for 9.1beta2Peter Eisentraut2011-06-09
|
* Pgindent run before 9.1 beta2.Bruce Momjian2011-06-09
|
* For create/dropdb, only connect once to the server since we now have aBruce Momjian2011-05-10
| | | | | | shared description table for pg_database comments. Also update comments about database name selection.
* pgindent run before PG 9.1 beta 1.Bruce Momjian2011-04-10
|
* Convert createlang/droplang to use CREATE/DROP EXTENSION.Tom Lane2011-03-05
| | | | | | | | | | In createlang this is a one-line change. In droplang there's a whole lot of cruft that can be discarded since the extension mechanism now manages removal of the language's support functions. Also, add deprecation notices to these two programs' reference pages, since per discussion we may toss them overboard altogether in a release or two.
* Stamp copyrights for year 2011.Bruce Momjian2011-01-01
|
* Improved parallel make supportPeter Eisentraut2010-11-12
| | | | | | | | Replace for loops in makefiles with proper dependencies. Parallel make can now span across directories. Also, make -k and make -q work properly. GNU make 3.80 or newer is now required.
* Convert cvsignore to gitignore, and add .gitignore for build targets.Magnus Hagander2010-09-22
|
* Remove cvs keywords from all files.Magnus Hagander2010-09-20
|
* Split the LDFLAGS make variable into two parts: LDFLAGS is now used forTom Lane2010-07-05
| | | | | | | | | | | | | linking both executables and shared libraries, and we add on LDFLAGS_EX when linking executables or LDFLAGS_SL when linking shared libraries. This provides a significantly cleaner way of dealing with link-time switches than the former behavior. Also, make sure that the various platform-specific %.so: %.o rules incorporate LDFLAGS and LDFLAGS_SL; most of them missed that before. (I did not add these variables for the platforms that invoke $(LD) directly, however. It's not clear if we can do that safely, since for the most part we assume these variables use CC command-line syntax.) Per gripe from Aaron Swenson and subsequent investigation.
* Add missing 'Z' letter to getopt_long call --- the newly addedTom Lane2010-06-11
| | | | | | --analyze-only switch did not work in its short form -Z. Josh Berkus
* Translation updatePeter Eisentraut2010-05-13
|
* Add PGFILEDESC description to Makefiles for all /contrib executables.Bruce Momjian2010-05-12
| | | | Add PGAPPICON to all executable makefiles.
* In vacuumdb --help, call analyze "statistics", not "hints".Bruce Momjian2010-02-26
|
* pgindent run for 9.0Bruce Momjian2010-02-26
|
* Translation updates for 9.0alpha4Peter Eisentraut2010-02-19
|
* Stamp HEAD as 9.0devel, and update various places that were referring to 8.5Tom Lane2010-02-17
| | | | (hope I got 'em all). Per discussion, this release will be 9.0 not 8.5.
* Remove old-style VACUUM FULL (which was known for a little while asTom Lane2010-02-08
| | | | | | | | | | | | | | | | | VACUUM FULL INPLACE), along with a boatload of subsidiary code and complexity. Per discussion, the use case for this method of vacuuming is no longer large enough to justify maintaining it; not to mention that we don't wish to invest the work that would be needed to make it play nicely with Hot Standby. Aside from the code directly related to old-style VACUUM FULL, this commit removes support for certain WAL record types that could only be generated within VACUUM FULL, redirect-pointer removal in heap_page_prune, and nontransactional generation of cache invalidation sinval messages (the last being the sticking point for Hot Standby). We still have to retain all code that copes with finding HEAP_MOVED_OFF and HEAP_MOVED_IN flag bits on existing tuples. This can't be removed as long as we want to support in-place update from pre-9.0 databases.
* Modify recently added PQconnectdbParams() with new argument, expand_dbname.Joe Conway2010-02-05
| | | | | | | | | | | | | | | | If expand_dbname is non-zero and dbname contains an = sign, it is taken as a conninfo string in exactly the same way as if it had been passed to PQconnectdb. This is equivalent to the way PQsetdbLogin() works, allowing PQconnectdbParams() to be a complete alternative. Also improve the way the new function is called from psql and replace a previously missed call to PQsetdbLogin() in psql. Additionally use PQconnectdbParams() for pg_dump and friends, and the bin/scripts command line utilities such as vacuumdb, createdb, etc. Finally, update the documentation for the new parameter, as well as the nuances of precedence in cases where key words are repeated or duplicated in the conninfo string.
* Use -Z for vacuumdb --analyze-only, rather than -o.Bruce Momjian2010-01-07
|
* Rename new vacuumdb option to --analyze-only from --only-analyze.Bruce Momjian2010-01-07
|
* Corrected CVS entry:Bruce Momjian2010-01-06
| | | | --only-analyze mode is for _vacuumdb_, not pg_dump.