Commit Graph

2823 Commits

Author SHA1 Message Date
Bruce Momjian 124c22d5fd Remove use of postmaster.opts.default by pg_ctl. 2008-06-26 01:12:20 +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
Heikki Linnakangas 8b64a2642a Add optional on/off argument to \timing.
David Fetter.
2008-06-11 10:48:17 +00:00
Neil Conway 109940c635 Editorialization for the text emitted by the "help" psql command.
Basically just reuse the same text that psql emitted as part of
its startup banner in prior versions, and make some whitespace
more consistent with the conventions in other psql command output.
2008-06-10 20:58:19 +00:00
Tom Lane eaa70a3891 Fix initdb to reject a relative path for -X (--xlogdir) argument. This
doesn't work, and the real reason why not is it's unclear where the path
is relative to (initdb's CWD, or the data directory?).  We could make an
arbitrary decision, but it seems best to make the user be unambiguous.
Per gripe from Devrim.
2008-06-02 03:48:00 +00:00
Magnus Hagander 06e6573d57 Fix function headers not matching prototype in header file, per
compiler warnings on msvc.
2008-05-21 16:00:10 +00:00
Andrew Dunstan 07d08a8828 Remove old kluge put in to allow Windows regression tests to succeed, and now
found to have been made necessary by our skipping tty detection on Windows. Now
that we are doing tty detection on Windows the kluge is unnecessary and wrong.
2008-05-18 06:50:08 +00:00
Bruce Momjian 265f19d78b Use isatty() test for pager on Win32; not sure why it was disabled for
that platform.
2008-05-17 23:34:44 +00:00
Bruce Momjian e2cd62c3e1 In psql, test for output to stdout when forcing pager for wide output. 2008-05-17 21:40:44 +00:00
Tom Lane 2e27b0e146 Fix utterly-bogus code for computing row heights. Per crashes on
spoonbill, though one wonders why it didn't misbehave everywhere.
In passing remove some unnecessary modulo calculations.
2008-05-17 17:52:14 +00:00
Tom Lane 10a3471bed Add a RESTART (without parameter) option to ALTER SEQUENCE, allowing a
sequence to be reset to its original starting value.  This requires adding the
original start value to the set of parameters (columns) of a sequence object,
which is a user-visible change with potential compatibility implications;
it also forces initdb.

Also add hopefully-SQL-compatible RESTART/CONTINUE IDENTITY options to
TRUNCATE TABLE.  RESTART IDENTITY executes ALTER SEQUENCE RESTART for all
sequences "owned by" any of the truncated relations.  CONTINUE IDENTITY is
a no-op option.

Zoltan Boszormenyi
2008-05-16 23:36:05 +00:00
Tom Lane e7b498bd5e Recent patch doesn't compile without <limits.h> 2008-05-16 18:35:38 +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 43ee22826b Add detection of psql pager to trigger on wide output. Also add pager
detection for wrapped lines or lines with newlines that need pager to
display.
2008-05-16 16:59:05 +00:00
Tom Lane 3bc25384d7 Move the "instr_time" typedef and associated macros into a new header
file portability/instr_time.h, and add a couple more macros to eliminate
some abstraction leakage we formerly had.  Also update psql to use this
header instead of its own copy of nearly the same code.

This commit in itself is just code cleanup and shouldn't change anything.
It lays some groundwork for the upcoming function-stats patch, though.
2008-05-14 19:10:29 +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 210faf2d5f Fix a few warnings that have crept into CVS HEAD. 2008-05-14 15:16:27 +00:00
Alvaro Herrera a61b2464fa Change \du to use the new printTable API, improving the situation of very wide
tables.

Brendan Jurd, with some help from me.
2008-05-13 00:23:17 +00:00
Alvaro Herrera e6a64bd3b6 Fix a bug in the previous patch, which caused the title pointer to be used
before it was actually set.
2008-05-13 00:14:11 +00:00
Alvaro Herrera 1e9199e84c Improve psql's internal print.c code by introducing an actual print API.
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-05-12 22:59:58 +00:00
Alvaro Herrera f8c4d7db60 Restructure some header files a bit, in particular heapam.h, by removing some
unnecessary #include lines in it.  Also, move some tuple routine prototypes and
macros to htup.h, which allows removal of heapam.h inclusion from some .c
files.

For this to work, a new header file access/sysattr.h needed to be created,
initially containing attribute numbers of system columns, for pg_dump usage.

While at it, make contrib ltree, intarray and hstore header files more
consistent with our header style.
2008-05-12 00:00:54 +00:00
Tom Lane 125ed6853e Restore psql's former behavior that padding spaces to the right of the last
output column are not emitted.  (That change already caused more noise in
the regression test output files than I would like.)  Provide some needed
editorial help for comments, clean up code formatting.
2008-05-10 03:31:58 +00:00
Tom Lane cd902b331d Change the rules for inherited CHECK constraints to be essentially the same
as those for inherited columns; that is, it's no longer allowed for a child
table to not have a check constraint matching one that exists on a parent.
This satisfies the principle of least surprise (rows selected from the parent
will always appear to meet its check constraints) and eliminates some
longstanding bogosity in pg_dump, which formerly had to guess about whether
check constraints were really inherited or not.

The implementation involves adding conislocal and coninhcount columns to
pg_constraint (paralleling attislocal and attinhcount in pg_attribute)
and refactoring various ALTER TABLE actions to be more like those for
columns.

Alex Hunsaker, Nikhil Sontakke, Tom Lane
2008-05-09 23:32:05 +00:00
Peter Eisentraut d35c56ed9f Add "%option noinput" to the scanners to avoid compiler warnings. GCC 4.3
began to realize that the input() function isn't used and printed warnings.
2008-05-09 15:36:31 +00:00
Tom Lane e1435983b8 Fix memory stomp that's turning the whole buildfarm pink: you can't hack up
pg_wcsformat without changing pg_wcssize to match.  Add some comments to
try to make that clearer, and make a couple other minor editorializations.
2008-05-09 05:25:04 +00:00
Bruce Momjian eabd1b2ee8 Have psql output tab as the proper number of spaces, rather than \x09. 2008-05-08 19:11:36 +00:00
Bruce Momjian 5adf98ae24 Add psql '\pset format wrapped' mode to wrap output to screen width, or
file/pipe output too if \pset columns' is set.

Bryce Nesbitt
2008-05-08 17:04:26 +00:00
Bruce Momjian 0f5651a90f Have boolean pset values checked against typical boolean values, rather
than only 'off'.
2008-05-07 02:33:52 +00:00
Andrew Dunstan a87f15d506 Display ACLS using multiple lines for psql's \z. Brendan Jurd. 2008-05-05 01:21:03 +00:00
Andrew Dunstan c0b1b01ef5 Show enum values in psql's \dt+. David Fetter. 2008-05-05 00:11:31 +00:00
Andrew Dunstan 0ff74f03b1 add ; missing due to my carelessness 2008-05-04 08:32:21 +00:00
Andrew Dunstan c2c9fbef94 Place statement timeout more appropriately, per gripe from Tom. 2008-05-04 03:46:08 +00:00
Andrew Dunstan 17a56c0b55 Disable statement timeouts while making or restoring dumps.
Joshua Drake.
2008-05-03 23:32:32 +00:00
Heikki Linnakangas 72e1d28afd Show relation size in verbose (e.g. \d+) output.
Dickson S. Guedes
2008-05-02 10:16:16 +00:00
Peter Eisentraut 6f093f3825 One-letter backslash commands now need a space before the first argument.
This has been the only documented and encouraged syntax for a long time, and
with extension facilities such as aliases being proposed, it is a good time to
clean up the legacy syntax a bit.

Author: Bernd Helmle <mailings@oopsware.de>
2008-05-02 09:27:51 +00:00
Magnus Hagander 380d1ee69e Update error messages, per notes from Tom.
Laurenz Albe
2008-04-24 14:23:43 +00:00
Magnus Hagander c979a1fefa Prevent shutdown in normal mode if online backup is running, and
have pg_ctl warn about this.

Cancel running online backups (by renaming the backup_label file,
thus rendering the backup useless) when shutting down in fast mode.

Laurenz Albe
2008-04-23 13:44:59 +00:00
Tom Lane 8472bf7a73 Allow float8, int8, and related datatypes to be passed by value on machines
where Datum is 8 bytes wide.  Since this will break old-style C functions
(those still using version 0 calling convention) that have arguments or
results of these types, provide a configure option to disable it and retain
the old pass-by-reference behavior.  Likewise, provide a configure option
to disable the recently-committed float4 pass-by-value change.

Zoltan Boszormenyi, plus configurability stuff by me.
2008-04-21 00:26:47 +00:00
Bruce Momjian a9b3e4fa6f Fix comment typo.
Bryce Nesbitt
2008-04-16 18:18:00 +00:00
Tom Lane 9b5c8d45f6 Push index operator lossiness determination down to GIST/GIN opclass
"consistent" functions, and remove pg_amop.opreqcheck, as per recent
discussion.  The main immediate benefit of this is that we no longer need
8.3's ugly hack of requiring @@@ rather than @@ to test weight-using tsquery
searches on GIN indexes.  In future it should be possible to optimize some
other queries better than is done now, by detecting at runtime whether the
index match is exact or not.

Tom Lane, after an idea of Heikki's, and with some help from Teodor.
2008-04-14 17:05:34 +00:00
Alvaro Herrera 10be77c173 Fix indentation in new REFERENCED BY psql output, per Brendan Jurd. 2008-04-14 15:04:20 +00:00
Tom Lane c22ed3d523 Turn the -i/--ignore-version options of pg_dump and pg_dumpall into no-ops:
the server version check is now always enforced.  Relax the version check to
allow a server that is of pg_dump's own major version but a later minor
version; this is the only case that -i was at all safe to use in.

pg_restore already enforced only a very weak version check, so this is
really just a documentation change for it.

Per discussion.
2008-04-13 03:49:22 +00:00
Tom Lane d785b39fbf A small visit from the portability and localization police. 2008-04-05 03:40:15 +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 b65a509746 Show database access privileges in psql's \l command. For \l+, also show
database size, when available to the current user.

Andrew Gilligan
2008-03-30 18:10:20 +00:00
Tom Lane 2be368a5af Display incoming as well as outgoing foreign-key constraints in psql's
\d output for a table.

Kenneth D'Souza, some changes by myself.
2008-03-30 17:50:11 +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
Tom Lane 5787d50acc Improve psql's tab completion to handle completing attribute names in cases
where the relation name was schema-qualified, for example
	UPDATE foo.bar SET <tab>
Also support cases where the relation name was quoted unnecessarily,
for example
	UPDATE "foo" SET <tab>

Greg Sabino Mullane, slightly simplified by myself.
2008-03-29 19:19:14 +00:00
Tom Lane 7692d8d5b7 Support statement-level ON TRUNCATE triggers. Simon Riggs 2008-03-28 00:21:56 +00:00