Commit Graph

257 Commits

Author SHA1 Message Date
Magnus Hagander 43d07d63b1 Revert patch for --psqlrc=FILENAME in psql. 2010-03-07 17:02:34 +00:00
Magnus Hagander 66c2cc2ba9 Add --psqlrc=FILENAME parameter to psql, to process an explicitly named
file instead of ~/.psqlrc on startup.
2010-03-06 15:28:09 +00:00
Bruce Momjian 0239800893 Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
Alvaro Herrera 474f825574 Add the new psql command \drds to the psql docs, help and tab completion.
I also thank Bernd Helmle for the documentation help on the previous settings
patch, which I forgot on the commit message.
2009-10-08 16:34:01 +00:00
Tom Lane 249724cb01 Create an ALTER DEFAULT PRIVILEGES command, which allows users to adjust
the privileges that will be applied to subsequently-created objects.

Such adjustments are always per owning role, and can be restricted to objects
created in particular schemas too.  A notable benefit is that users can
override the traditional default privilege settings, eg, the PUBLIC EXECUTE
privilege traditionally granted by default for functions.

Petr Jelinek
2009-10-05 19:24:49 +00:00
Peter Eisentraut 20f7f019f9 Easier to translate psql help
Instead of requiring translators to translate the entire SQL command
synopses, change create_help.pl to only require them to translate the
placeholders, and paste those into the synopsis using a printf mechanism.
Make some small updates to the markup to make it easier to parse.

Note: This causes msgmerge of gettext 0.17 to segfault.  You will need
the patch from https://savannah.gnu.org/bugs/?27474 to make it work.
msgmerge usually only runs on babel.postgresql.org, however.
2009-09-18 05:00:42 +00:00
Peter Eisentraut 5e22994127 Document \dg+ and \du+
The fact that \dg and \du take the + option was missing in the documentation.

backpatched to 8.4

Author: Andreas Wenk <a.wenk@netzmeister-st-pauli.de>
2009-07-24 19:35:44 +00:00
Bruce Momjian d747140279 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
provided by Andrew.
2009-06-11 14:49:15 +00:00
Bruce Momjian 73b44dca38 Use brackets in psql \df \? help. 2009-04-22 14:58:48 +00:00
Bruce Momjian 301f800895 Merge psql \df options into a single \? line, and update docs. 2009-04-21 17:23:05 +00:00
Bruce Momjian aeb3c2fce4 Add agg/normal/trigger/window flags for psql \df and in \df output.
David Fetter
2009-04-21 15:49:06 +00:00
Peter Eisentraut 86eab8dae0 Message improvement 2009-04-11 14:11:21 +00:00
Tom Lane 5b02174144 Add missing help output for \ef option. Andrew Gierth 2009-04-03 23:38:19 +00:00
Peter Eisentraut de0c3b3e58 Update line count for \? output (obtained from wc -l) 2009-03-25 13:15:55 +00:00
Peter Eisentraut 842f4bcfe4 In the \? output, align the columns consistently. 2009-03-25 13:14:17 +00:00
Peter Eisentraut 9987f66001 Fix my typo 2009-03-24 12:57:31 +00:00
Peter Eisentraut 92fc8b41e5 Add the long options to the psql --help display, where they were curiously
missing.

Since this touches most lines of the help output, also change the mix of
puts and printf calls to printf everywhere, for easier code editing and
reviewing.
2009-02-27 09:58:09 +00:00
Peter Eisentraut 9de59fd191 Add a -w/--no-password option that prevents all password prompts to all
programs that have a -W/--password option.

In passing, remove the ancient PSQL_ALWAYS_GET_PASSWORDS compile option.
2009-02-26 16:02:39 +00:00
Peter Eisentraut cd3b750929 Sort the output of --help mostly alphabetical, make it align better, make
help of pg_dump and pg_dumpall more similar.
2009-02-25 13:03:07 +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 511db38ace Update copyright for 2009. 2009-01-01 17:24:05 +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
Tom Lane cdc197cf31 Improve psql's \dC command to take a pattern parameter. Casts are shown
if their source or target types match the pattern (using the same definition
of "match" as \dT does).  Per recent discussion.
2008-11-06 15:18:36 +00:00
Alvaro Herrera c67f037f4f Document that \t and \x are now settable. 2008-08-29 15:52:07 +00:00
Heikki Linnakangas 15dc3f59c7 Update "help" output to reflect that \timing now takes an optional on/off
argument.
2008-06-11 10:55:43 +00:00
Bruce Momjian 9263d86f59 Update psql startup banner to be shorter, suggest "help" for help.
Add a few "help" entries.

Move \g help entry into "General".

Update psql version mismatch warning text.

Joshua D. Drake
2008-05-16 17:17:00 +00:00
Bruce Momjian 719a115874 Reorgnize psql \? help output, to reduce the size of the "General"
heading at the top;   broken into more sections now.
2008-05-14 15:30:22 +00:00
Bruce Momjian b6f0ad4b0e Have psql command 'help' suggest the use of \?, updated version.
Greg Sabino Mullane
2008-04-04 18:00:25 +00:00
Bruce Momjian dc565af454 Allow 'help' in psql to show \? help, for novice assistance.
Greg Sabino Mullane
2008-04-04 17:42:43 +00:00
Tom Lane 2f6e61b8a6 Improve description of \du and \dg, per suggestion from
Harald Armin Massa.
2008-03-29 19:40:12 +00:00
Magnus Hagander 2d7705e85e Include \password in the psql help.
While at it, change the order of the documented options to be
alphabetically again.
2008-03-26 15:24:56 +00:00
Tom Lane f7108ce06b Fix psql \h output for case of no parameters (ie, list all the known commands)
to format properly for the actually needed column width, instead of having
a hard-wired assumption about the longest command name length.  Also make it
respond to the current screen width.  In passing, const-ify the constant
table.
2008-01-20 21:13:55 +00:00
Bruce Momjian 9098ab9e32 Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
Tom Lane 1ebff9ba81 Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
Bruce Momjian fdf5a5efb7 pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
Tom Lane 140d4ebcb4 Tsearch2 functionality migrates to core. The bulk of this work is by
Oleg Bartunov and Teodor Sigaev, but I did a lot of editorializing,
so anything that's broken is probably my fault.

Documentation is nonexistent as yet, but let's land the patch so we can
get some portability testing done.
2007-08-21 01:11:32 +00:00
Bruce Momjian 7031dd6869 Add psql \prompt capability.
Chad Wagner
2007-02-23 18:20:59 +00:00
Bruce Momjian 29dccf5fe0 Update CVS HEAD for 2007 copyright. Back branches are typically not
back-stamped for this.
2007-01-05 22:20:05 +00:00
Peter Eisentraut b9b4f10b5b Message style improvements 2006-10-06 17:14:01 +00:00
Tom Lane 9b556322c5 Fix some missing inclusions identified with new pgcheckdefines tool. 2006-07-15 03:35:21 +00:00
Bruce Momjian e0522505bd Remove 576 references of include files that were not needed. 2006-07-14 14:52:27 +00:00
Tom Lane ae643747b1 Fix a passel of recently-committed violations of the rule 'thou shalt
have no other gods before c.h'.  Also remove some demonstrably redundant
#include lines, mostly of <errno.h> which was added to c.h years ago.
2006-07-14 05:28:29 +00:00
Tom Lane e2e2a9db4c Code review for psql multiline history patch(es). Fix memory leak,
failure to enter commands in history if canceled by control-C, other
infelicities.
2006-06-11 23:06:00 +00:00
Bruce Momjian f2f5b05655 Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
Bruce Momjian 0f57851e31 Add psql option:
-1 or --single-transaction

Simon Riggs
2006-02-12 04:04:32 +00:00
Bruce Momjian 07bae9c099 Please find enclosed a patch that lets you use \c to connect
(optionally) to a new host and port without exiting psql.  This
eliminates, IMHO, a surprise in that you can now connect to PostgreSQL
on a differnt machine from the one where you started your session. This
should help people who use psql as an administrative tool.

David Fetter
2006-02-12 02:54:30 +00:00
Bruce Momjian 4cb27fef0a o Improve psql's handling of multi-line statements
Currently, while \e saves a single statement as one entry, interactive
	statements are saved one line at a time.  Ideally all statements
	would be saved like \e does.

Sergey E. Koposov
2006-02-11 21:55:35 +00:00
Bruce Momjian 1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
Bruce Momjian 507465525e \pset numericsep -> numericlocale. 2005-07-18 20:57:53 +00:00
Bruce Momjian 73a7c322c3 Add psql \pset numericsep to allow output numbers like 100,000.0 or
100.000,0.

Eugen Nedelcu
2005-07-10 03:46:13 +00:00
Bruce Momjian c3a69c3b3b Attached is a patch that enhances the "\h" capability in psql. I often
find myself typing a command and then wanting to get the syntax for it.
So I do a ctrl-a and add a \h: but psql does not recognize the command,
because I have stuff attached to it (e.g. "alter table foobar"), so I
have to scroll over and delete everything except the name of the command
itself. This patch gives \h three chances to match: if nothing matches
the complete string (current behavior), it tries to match the first two
words (e.g. "ALTER TABLE"). If that fails, it tries to match the first
word (e.g. "DELETE").

Greg Sabino Mullane
2005-07-06 03:14:48 +00:00
Bruce Momjian 2ee0d5549f Add -L option to psql to log sessions.
Lorne Sunley
2005-06-14 02:57:45 +00:00
Bruce Momjian 0542b1e2fe Use _() macro consistently rather than gettext(). Add translation
macros around strings that were missing them.
2005-02-22 04:43:23 +00:00
Tom Lane 8afe005f42 Consistently use geteuid() not getuid(); there were a few places deviating
from our long-established standard.
2005-01-08 22:51:15 +00:00
Bruce Momjian 2daed8c5b3 Update copyrights that were missed. 2005-01-01 05:43:09 +00:00
PostgreSQL Daemon 2ff501590b Tag appropriate files for rc3
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-31 22:04:05 +00:00
Neil Conway e17766c12e Trivial fix for a bug introduced in r1.94 of help.c: we want to only
include "\s" in \? output when readline is enabled, but that commit
supressed "\s" whether readline was enabled or not.
2004-11-24 04:58:42 +00:00
Peter Eisentraut 7d8578a0c2 Clarify some strings 2004-11-09 14:39:44 +00:00
Peter Eisentraut 0fd37839d9 Message style revisions 2004-10-12 21:54:45 +00:00
Bruce Momjian c62a5465fb Suppress psql \s help display for platforms like Win32 that don't
typically install witn readline, and throw an error if they try to
access it.
2004-10-06 18:39:16 +00:00
Bruce Momjian b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
Bruce Momjian da9a8649d8 Update copyright to 2004. 2004-08-29 04:13:13 +00:00
Bruce Momjian 21d16121bf Ignore trailing spaces in psql \h.
Greg Sabino Mullane
2004-08-07 03:36:07 +00:00
Bruce Momjian 93a1fce5cc Add permission display to \db+. 2004-07-15 03:56:06 +00:00
Bruce Momjian bbcee544aa Have \dn+ show permissions and description for schemas.
Dennis Bjorklund
2004-07-13 16:48:16 +00:00
Tom Lane 2467394ee1 Tablespaces. Alternate database locations are dead, long live tablespaces.
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-06-18 06:14:31 +00:00
Tom Lane 0bd61548ab Solve the 'Turkish problem' with undesirable locale behavior for case
conversion of basic ASCII letters.  Remove all uses of strcasecmp and
strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp;
remove most but not all direct uses of toupper and tolower in favor of
pg_toupper and pg_tolower.  These functions use the same notions of
case folding already developed for identifier case conversion.  I left
the straight locale-based folding in place for situations where we are
just manipulating user data and not trying to match it to built-in
strings --- for example, the SQL upper() function is still locale
dependent.  Perhaps this will prove not to be what's wanted, but at
the moment we can initdb and pass regression tests in Turkish locale.
2004-05-07 00:24:59 +00:00
Bruce Momjian 3ceda5eab3 I just noticed that \dp outputs "Table" to indicate relations (tables,
sequences and views).  This patch allows it to handle views and
sequences.

Euler Taveira de Oliveira
2004-03-22 03:38:24 +00:00
Bruce Momjian 5c0d0a2399 Have psql help show \w parameter as requied. 2004-01-09 21:15:51 +00:00
Bruce Momjian 8c4af96fb0 This makes help like this:
\lo_export LOBOID FILE
   \lo_import FILE [COMMENT]
   \lo_list
   \lo_unlink LOBOID    large object operations

Instead of not saying anything about what arguments are required.

Christopher Kings-Lynne
2003-12-01 22:34:48 +00:00
Bruce Momjian 8bb60b6423 attached is a patch that adds display of the groups a user belongs to to
\du and a \dg command to psql. It's against 7.4beta5.

Markus Bertheau <twanger@bluetwanger.de>
2003-12-01 22:21:54 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Peter Eisentraut d938e8b0f4 Add documentation about \pset footer to \?.
from Patrick Welche
2003-10-02 06:39:31 +00:00
Peter Eisentraut 20aaf64252 Allow translation of SQL help in psql. 2003-09-14 22:37:13 +00:00
Bruce Momjian d768cb267b seemed like a typo in one of the appendix tables
Robert Treat
2003-09-11 16:22:42 +00:00
Bruce Momjian d6a9b4e0b5 Update row count for \? output, used by pager. 2003-09-10 21:35:55 +00:00
Tom Lane 2f9c859ea1 Fix some copyright notices that weren't updated. Improve copyright tool
so it won't miss 'em again.
2003-08-04 23:59:41 +00:00
Bruce Momjian 089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
Bruce Momjian ad73f6b86f Update copyrights to 2003.
print.c: Add one more line to pager calculation to account for the prompt.
help.c: Call PageOutput with correct number of lines within slashUsage
        Add one to line count in helpSQL to account for "Available help:" line.
        Make copyright match COPYRIGHT file. (Just "1994")

Greg Sabino Mullane
2003-07-25 21:48:45 +00:00
Peter Eisentraut c154fc3a20 Apply message style guide to frontend programs. 2003-07-23 08:47:41 +00:00
Bruce Momjian 8de72414ea Document the -h client flag can use a socket directory as well as a host
name.
2003-06-11 05:13:12 +00:00
Bruce Momjian 6bfa2df64e Document file name as optional for \o in psql help (\h). 2003-04-14 16:23:36 +00:00
Peter Eisentraut cf1cf89649 Make the printing code somewhat more independent by not relying on
functions and global variables from the rest of psql.  Also clean up some
data type mismatches created by the last pager patch.
2003-03-18 22:15:44 +00:00
Bruce Momjian 51b2b6433b Cleanup up psql \connect and \pset pager setting display, Dennis
Bj?rklund.
2003-03-10 15:46:03 +00:00
Tom Lane b4b62cff93 Apply the proper version of Christopher Kings-Lynne's describe patch
(ie, the one with describe-schema support).  Minor code review.
Adjust display of casts to use standard type names.
2003-01-07 20:56:07 +00:00
Bruce Momjian 29cdab3d53 Increment libpq major number for 7.3.1 and minor for 7.4. 2002-12-13 22:17:57 +00:00
Bruce Momjian 40c4472e22 TODO marked as done:
* Add schema, cast, and conversion backslash commands to psql

I had to create a new publically available function,
pg_conversion_is_visible, as it seemed to be missing from the catalogs.
This required me to do no small amount of hacking around in namespace.c

I have updated the \? help and sgml docs.

\dc - list conversions [PATTERN]
\dC - list casts
\dn list schemas

I didn't support patterns with casts as there's nothing obvious to match
against.

Catalog version incremented --- initdb required.

Christopher Kings-Lynne
2002-12-12 21:02:25 +00:00
Bruce Momjian b7ebebea1e Move psql \? Formatting above Large Object/Copy. 2002-12-11 23:07:06 +00:00
Bruce Momjian c4a7e5dd9f psql \? rearrangement, suggested by Tom. 2002-12-11 23:03:45 +00:00
Bruce Momjian 721dd19212 Reorder psql \? help into groupings, idea from Harald Armin Massa. 2002-12-11 22:45:13 +00:00
Bruce Momjian 0046d80b97 Back out psql help change. Not done yet. 2002-12-11 04:09:51 +00:00
Bruce Momjian 6ca16d7b80 Bump version for 7.3 and 7.4. 2002-12-11 04:07:39 +00:00
Bruce Momjian b26dfbb0e3 Here is a patch that does just that, while maintaining the
"traditional" behavior, so the change should be transparent. Use the
command "\pset pager always" to turn it on. Anything else does the
normal toggle between "on" and "off"

Greg Sabino Mullane
2002-11-08 19:12:21 +00:00
Bruce Momjian b093f8825d Fix include files for new PageOutput call. 2002-10-24 01:33:50 +00:00
Bruce Momjian 641b658c26 Page \h output and centralize psql paging code in PageOutput(). 2002-10-23 19:23:57 +00:00
Peter Eisentraut 4cff161703 Improve formatting of --help output. 2002-10-18 22:05:36 +00:00
Peter Eisentraut 2972fd5d83 Translation updates, some messages tweaked. 2002-09-22 20:57:21 +00:00
Bruce Momjian e50f52a074 pgindent run. 2002-09-04 20:31:48 +00:00
Bruce Momjian 6deb649cd3 Add '+' mention in \? help. More clean of \? to do. 2002-08-27 18:28:29 +00:00
Tom Lane 8be9bd83ac psql prints its version number in its startup message, per recent
discussion.  Also, cause the \timing command to display time in a
format consistent with the backend's EXPLAIN ANALYZE output.
2002-08-10 19:35:01 +00:00
Peter Eisentraut 029aa97f2d Make sure all clients have the same understanding of default user name
and database.  In particular, make script wrappers understand the
PGDATABASE environment variable.
2002-08-10 16:57:32 +00:00
Bruce Momjian 91dfa1af97 Fix \? and \pset pager handling. \? wasn't honoring pager before. 2002-07-15 01:56:25 +00:00
Bruce Momjian d84fe82230 Update copyright to 2002. 2002-06-20 20:29:54 +00:00
Bruce Momjian 714f7859d8 psql \? cleanups by Ian Barwick 2002-03-19 03:01:01 +00:00
Bruce Momjian a7ade2bb6b Add psql \dD listing of domains, from Jonathan Eisler. 2002-03-19 02:32:21 +00:00
Bruce Momjian 66b6bf67a1 More pgsql \? cleanup for Peter E. 2002-03-11 18:26:20 +00:00
Bruce Momjian 560a2c017c Correct optional args in psql \? as pointed out by Ian Barwick. 2002-03-11 18:22:03 +00:00
Bruce Momjian 7d1b8fe716 Back out psql domain improvements until domain is applied. 2002-03-07 17:54:42 +00:00
Bruce Momjian c666d6fd41 Here is a diff of changes to the psql source code implementing a simple
'list domains' command '\dD'. This is the interface component of
rbt@zort.ca's domain backend modifications.

Jonathan Eisler
2002-03-06 20:39:45 +00:00
Bruce Momjian ed5eb09cce Adds \du documentation line for \? in psqls help.c
Thought I saw a patch earlier converting docs to use []s, so this uses
them.

Rod Taylor
2002-03-05 06:13:19 +00:00
Bruce Momjian 25b0b09fd3 Add \timing patch to psql. Times all queries.
Greg Sabino Mullane
2002-03-05 00:01:03 +00:00
Bruce Momjian b81844b173 pgindent run on all C files. Java run to follow. initdb/regression
tests pass.
2001-10-25 05:50:21 +00:00
Peter Eisentraut 05150e2df3 Add French psql translation. (My rendition of French anyway...)
Fix typo in message.
2001-06-11 18:23:33 +00:00
Peter Eisentraut 0acd843c05 Finish German translation, edit (original) messages a bit. 2001-06-08 23:53:48 +00:00
Peter Eisentraut e542036461 Native Language Support (NLS)
Use --enable-nls to turn it on; see installation instructions for details.
See developer's guide how to make use of it in programs and how to add
translations.

psql sources have been almost fully prepared and an incomplete German
translation has been provided.  In the backend, only elog() calls are
currently translatable, and the provided German translation file is more
of a placeholder.
2001-06-02 18:25:18 +00:00
Peter Eisentraut 232724af0d Add \cd command to psql. 2001-05-07 19:31:33 +00:00
Bruce Momjian 9e1552607a pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Tom Lane d08741eab5 Restructure the key include files per recent pghackers discussion: there
are now separate files "postgres.h" and "postgres_fe.h", which are meant
to be the primary include files for backend .c files and frontend .c files
respectively.  By default, only include files meant for frontend use are
installed into the installation include directory.  There is a new make
target 'make install-all-headers' that adds the whole content of the
src/include tree to the installed fileset, for use by people who want to
develop server-side code without keeping the complete source tree on hand.
Cleaned up a whole lot of crufty and inconsistent header inclusions.
2001-02-10 02:31:31 +00:00
Bruce Momjian 623bf843d2 Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group. 2001-01-24 19:43:33 +00:00
Bruce Momjian ebd61ac03f Remove -k unix socketpath option from client side, allow hostname with
leading slash to behave as a unix socket path.
2000-11-13 23:37:54 +00:00
Bruce Momjian 2150c2edf1 UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines.  We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:

1. The ability to listen only on a particular IP address.  Each
   hosting customer has their own IP address, on which all of their
   servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
   This allows us to automatically create an empty database, with an
   empty DBA password, for new or upgrading customers without having
   to interactively set a DBA password and communicate it to (or from)
   the customer.  This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
   change-rooted environment.  We run CGI programs chrooted to the
   user's home directory, which is another reason why we need to be
   able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
   root, and then setuid to the desired user.  (mysqld -u can almost
   do this; I had to patch it, too).

The patch below fixes problem 1-3.  I plan to address #4, also, but
haven't done so yet.  These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.

With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.

In summary, this patch makes the following enhancements:

1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
   and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
   listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().

The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.

David J. MacKenzie
2000-11-13 15:18:15 +00:00
Peter Eisentraut 27777b6645 Don't free() the result of getpwuid().
Discovered by Jason Tishler <Jason.Tishler@dothill.com>.
2000-09-22 23:02:00 +00:00
Bruce Momjian be6e7717db Fix \h SELECT to not show SELECT INTO. 2000-05-26 15:47:18 +00:00
Peter Eisentraut 9d31e3a991 /home/peter/commit-msg 2000-05-12 16:13:44 +00:00
Bruce Momjian 7da0f5d7de More psql help cleanup 2000-05-11 18:41:00 +00:00
Bruce Momjian 0fbde5d928 Add options and cleanup psql \? and -? help displays 2000-05-11 01:37:54 +00:00
Bruce Momjian 5a75ad5573 Update psql \? to show file rather than "fname". 2000-05-09 19:08:36 +00:00
Bruce Momjian 297e7f3ef4 Fix \h to not go past array bounds 2000-04-24 22:41:43 +00:00
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Peter Eisentraut 8de482a847 Added configure test for readline's filename_completion_function
Completed psql's \? help
2000-03-05 13:30:20 +00:00
Peter Eisentraut c75adac757 More fixes for psql ^C handling, especially during copy. Still doesn't
cope so well with copy to but that will have to wait for the next release.

Also added -X option to prevent reading .psqlrc startup file.
2000-03-01 21:10:05 +00:00
Peter Eisentraut 718bb2cc9c Moved psql \eset and \eshow to \encoding
Improved psql's Ctrl-C handling
Fixed configure test for sigsetjmp that now even recognizes it if it's a macro
2000-02-20 14:28:28 +00:00
Tom Lane e79b2dd5e7 Fix missing \n in some psql_error calls. 2000-02-20 02:37:40 +00:00
Tatsuo Ishii eb089e7f76 Add new backslash command \eset and \eshow. 2000-02-19 05:01:16 +00:00
Bruce Momjian 78693c89d7 Clean up include files use in psql. 2000-02-16 13:15:26 +00:00
Peter Eisentraut 9672d38f91 Adjusted psql echoing options (-a and -e) 2000-02-13 21:45:15 +00:00
Peter Eisentraut 2fb0ff0c5b Default argument for createdb
Changed EXIT_ON_ERROR to ON_ERROR_STOP in psql
2000-02-10 20:08:58 +00:00
Peter Eisentraut 9ceb5d8a7b Fixed psql double quoting of SQL ids
Fixed libpq printing functions
2000-02-07 23:10:11 +00:00
Peter Eisentraut 2b84cbb60f A few minor psql enhancements
Initdb help correction
Changed end/abort to commit/rollback and changed related notices
Commented out way old printing functions in libpq
Fixed a typo in alter table / alter column
2000-01-29 16:58:54 +00:00
Bruce Momjian 2d5dd7557b Update files. 2000-01-26 16:10:01 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00
Peter Eisentraut 65e0051843 another round of user interface cleanups
removed pg_id
fixed a few bugs in the scripts
2000-01-19 20:08:36 +00:00
Peter Eisentraut f565cf41ab another set of cleanups 2000-01-18 23:30:24 +00:00
Bruce Momjian 0cb6bc70ce Hi!
Here is a patch to bring both libpq and psql to a state where it compiles on
win32 (native) again. A lot of things have changed, and I have not been able
to keep up with them all, so it has been broken for quite a while.
After this patch, at least it compiles. It also talks "basic talk" to the
server, but I have not yet tested all things. Sending queries, and using
e.g. \d or \dt works fine. The rest will have to be tested further.
It also bumps the version on libpq.dll to 7.0.

Everything should be enclosed in #ifdef WIN32, unless I have missed
something. Except for one or maybe two places where I have moved a #include
that should not be used on win32 from the "global area" into a "#ifndef
WIN32 area".


//Magnus
2000-01-18 19:05:31 +00:00
Peter Eisentraut 7c9390caa1 Fixed psql variables vs array syntax, as well as minor psql enhancements 2000-01-14 22:18:03 +00:00
Peter Eisentraut f6689a328f Fixed a few "fixes" and bugs. Adjusted messages and options to GNU suggestions. 2000-01-12 19:36:36 +00:00