summaryrefslogtreecommitdiff
path: root/src/bin/scripts/common.c
AgeCommit message (Collapse)Author
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-02-26pgindent run for 9.0Bruce Momjian
2010-02-05Modify recently added PQconnectdbParams() with new argument, expand_dbname.Joe Conway
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.
2010-01-02Update copyright for the year 2010.Bruce Momjian
2009-06-118.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian
provided by Andrew.
2009-04-05Remove a boatload of useless definitions of 'int optreset'. If weTom Lane
are using our own ports of getopt or getopt_long, those will define the variable for themselves; and if not, we don't need these, because we never touch the variable anyway.
2009-02-26Add a -w/--no-password option that prevents all password prompts to allPeter Eisentraut
programs that have a -W/--password option. In passing, remove the ancient PSQL_ALWAYS_GET_PASSWORDS compile option.
2009-02-25Remove feof(stdin) calls related to when to prompt for a password,Peter Eisentraut
leftovers from when the password was read from stdin.
2009-01-01Update copyright for 2009.Bruce Momjian
2008-05-12Improve psql's internal print.c code by introducing an actual print API.Alvaro Herrera
Provides for better code readability, but mainly this is infrastructure changes to allow further changes such as arbitrary footers on printed tables. Also, the translation status of each element in the table is more easily customized. Brendan Jurd, with some editorialization by me.
2008-01-01Update copyrights in source tree to 2008.Bruce Momjian
2007-12-09Fix up the PQconnectionUsedPassword mess: create a separateTom Lane
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-11-15pgindent run for 8.3.Bruce Momjian
2007-09-25Small string tweaksPeter Eisentraut
2007-07-08Get rid of client-code dependencies on the exact text of the no-passwordTom Lane
error message, by using PQconnectionUsedPassword() instead. Someday we might be able to localize that error message, but not until this coding technique has disappeared everywhere.
2007-04-09Add cancel handlers so it's possible to Ctrl-C clusterdb, reindexdbMagnus Hagander
and vacuumdb. ITAGAKI Takahiro, with minor fixes from me.
2007-01-05Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian
back-stamped for this.
2006-10-04pgindent run for 8.2.Bruce Momjian
2006-10-03Fix yesno_prompt() memory leak in /script tools, reported by Converity.Bruce Momjian
2006-09-22Surely this temp buffer needn't be static.Tom Lane
2006-09-22Rearrange yes/no prompting code so that the prompts always show thePeter Eisentraut
(possibly (un)translated) letters that are actually expected as input. Also reject invalid responses instead of silenty taken them as "no". with help from Bernd Helmle
2006-03-05Update copyright for 2006. Update scripts.Bruce Momjian
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-08-15Make createlang and droplang proof against weird search_path settingsTom Lane
by forcing search_path to be just pg_catalog.
2005-02-22Use _() macro consistently rather than gettext(). Add translationBruce Momjian
macros around strings that were missing them.
2005-01-08Consistently use geteuid() not getuid(); there were a few places deviatingTom Lane
from our long-established standard.
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-12-12Add missing newlines at end of error messages.Peter Eisentraut
2004-11-09Get rid of perror(), substitute some better phrased error messages.Peter Eisentraut
malloc() doesn't set errno, so most uses were buggy anyway.
2004-10-16Allow pg_ctl to determine the server is up when getting a request for aBruce Momjian
password. Make password error message a #define and use it consistently. Sean Chittenden
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-08-29Update copyright to 2004.Bruce Momjian
2004-06-01Remove init_nls() functions, call set_pglocale() directly.Bruce Momjian
Add locale to pg_ctl.c.
2004-05-25Make the locale location relocatable.Bruce Momjian
Adjust get_*_path functions to be limited to MAXPGPATH.
2004-04-19* Most changes are to fix warnings issued when compiling win32Bruce Momjian
* removed a few redundant defines * get_user_name safe under win32 * rationalized pipe read EOF for win32 (UPDATED PATCH USED) * changed all backend instances of sleep() to pg_usleep - except for the SLEEP_ON_ASSERT in assert.c, as it would exceed a 32-bit long [Note to patcher: If a SLEEP_ON_ASSERT of 2000 seconds is acceptable, please replace with pg_usleep(2000000000L)] I added a comment to that part of the code: /* * It would be nice to use pg_usleep() here, but only does 2000 sec * or 33 minutes, which seems too short. */ sleep(1000000); Claudio Natoli
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-09-07Changes for MinGW/WIN32:Bruce Momjian
o allow configure to see include/port/win32 include files o add matching Win32 accept() prototype o allow pg_id to compile with native Win32 API o fix invalide mbvalidate() function calls (existing bug) o allow /scripts to compile with native Win32 API o add win32.c to Win32 compiles (already in *.mak files)
2003-08-04pgindent run.Bruce Momjian
2003-05-27Internationalize interactive yes/no responses.Peter Eisentraut
2003-04-04Add Win32 path handling for / vs. \ and drive letters.Bruce Momjian
2003-03-18Reimplement create and drop scripts in C, to reduce repetitivePeter Eisentraut
connections, increase robustness, add NLS, and prepare for Windows port. (vacuumdb and clusterdb will follow later.)