Commit Graph

83 Commits

Author SHA1 Message Date
Bruce Momjian 9098ab9e32 Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +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
Bruce Momjian f99a569a2e pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
Tom Lane c2f60711d2 Create a FETCH_COUNT parameter that causes psql to execute SELECT-like
queries via a cursor, fetching a limited number of rows at a time and
therefore not risking exhausting memory.  A disadvantage of the scheme
is that 'aligned' output mode will align each group of rows independently
leading to odd-looking output, but all the other output formats work
reasonably well.  Chris Mair, with some additional hacking by moi.
2006-08-29 22:25:08 +00:00
Tom Lane 0434c46db0 Invent an assign-hook mechanism for psql variables similar to the one
existing for backend GUC variables, and use this to eliminate repeated
fetching/parsing of psql variables in psql's inner loops.  In a trivial
test with lots of 'select 1;' commands, psql's CPU time went down almost
10%, although of course the effect on total elapsed time was much less.
Per discussion about how to ensure the upcoming FETCH_COUNT patch doesn't
cost any performance when not being used.
2006-08-29 15:19:51 +00:00
Bruce Momjian 33bf73a79a Make the psql line counter 64-bit so it can handle files > 4gig lines.
David Fetter
2006-08-11 19:20:59 +00:00
Bruce Momjian f2f5b05655 Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
Bruce Momjian 1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +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 0725065b37 This patch shows the full path name when doing a \s in psql,
if you have previously issued a \cd command.

Greg Sabino Mullane
2005-06-09 23:28:10 +00:00
Bruce Momjian 2daed8c5b3 Update copyrights that were missed. 2005-01-01 05:43:09 +00:00
Tom Lane 6444bc3535 Set DEFAULT_EDITOR to notepad.exe on Windows, as per recent discussion. 2004-11-17 18:32:31 +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 3ca998b951 Allow psql to use 7.4.X database by not referencing tablespaces.
Greg Sabino Mullan
2004-08-20 20:18:23 +00:00
Bruce Momjian b1ffacddfc Rename find_my_binary/find_other_binary to
find_my_exec/find_other_exec().  Remove passing of progname to these
functions as they can find that out from argv[0], which they already
have.

Make get_progname return const char *, and update all progname variables
to be const char *.
2004-05-12 13:38:49 +00:00
Tom Lane f938c2b91b Revise syntax-error reporting behavior to give pleasant results for
errors in internally-generated queries, such as those submitted by
plpgsql functions.  Per recent discussions with Fabien Coelho.
2004-03-21 22:29:11 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +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
Tom Lane f9ebf36970 Update psql for some features of new FE/BE protocol. There is a
client-side AUTOCOMMIT mode now: '\set AUTOCOMMIT off' supports
SQL-spec commit behavior.  Get rid of LO_TRANSACTION hack --- the
LO operations just work now, using libpq's ability to track the
transaction status.  Add a VERBOSE variable to control verboseness
of error message display, and add a %T prompt-string code to show
current transaction-block status.  Superuser state display in the
prompt string correctly follows SET SESSION AUTHORIZATION commands.
Control-C works to get out of COPY IN state.
2003-06-28 00:12:40 +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 6783b2372e Another pgindent run. Fixes enum indenting, and improves #endif
spacing.  Also adds space for one-line comments.
2001-10-28 06:26:15 +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
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Bruce Momjian 78693c89d7 Clean up include files use in psql. 2000-02-16 13:15:26 +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
Peter Eisentraut f565cf41ab another set of cleanups 2000-01-18 23:30:24 +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
Bruce Momjian 77a4729936 This should fix the \e (\p, \g, ...) behaviour on an empty query buffer.
Also, minor tweakage of tab completion, and I hope the output is flushed
on time now.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-10 03:59:30 +00:00
Bruce Momjian 78bc83fedf * Includes tab completion. It's not magic, but it's very cool. At any
rate
  it's better than what used to be there.

* Does proper SQL "host variable" substitution as pointed out by Andreas
  Zeugwetter (thanks): select * from :foo; Also some changes in how ':'
  and ';' are treated (escape with \ to send to backend). This does
_not_
  affect the '::' cast operator, but perhaps others that contain : or ;
  (but there are none right now).

* To show description with a <something> listing, append '?' to command
  name, e.g., \df?. This seemed to be the convenient and logical
solution.
  Or append a '+' to see more useless information, e.g., \df+.

* Fixed fflush()'ing bug pointed out by Jan during the regression test
  discussion.

* Added LastOid variable. This ought to take care of TODO item "Add a
  function to return the last inserted oid, for use in psql scripts"
  (under CLIENTS)
  E.g.,
insert into foo values(...);
insert into bar values(..., :LastOid);
\echo $LastOid

* \d command shows constraints, rules, and triggers defined on the table
  (in addition to indices)

* Various fixes, optimizations, corrections

* Documentation update as well


Note: This now requires snprintf(), which, if necessary, is taken from
src/backend/port. This is certainly a little weird, but it should
suffice
until a source tree cleanup is done.

Enjoy.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-11-26 04:24:17 +00:00
Bruce Momjian 0e6652e673 psql cleanup 1999-11-04 23:14:30 +00:00
Bruce Momjian a45195a191 Major psql overhaul by Peter Eisentraut. 1999-11-04 21:56:02 +00:00