Commit Graph

343 Commits

Author SHA1 Message Date
Tatsuo Ishii
449b4cc177 Show encoding name rather than encoding id in case of psql -l. 2000-01-18 05:11:38 +00:00
Tom Lane
fdc85f50a3 Put back change to 'connection failed' message formatting that someone
overwrote.
2000-01-16 20:34:54 +00:00
Peter Eisentraut
759fba4873 Included all yacc and lex files into the distribution. 2000-01-16 20:05:00 +00:00
Tatsuo Ishii
bfbd58ce13 Adapt to the changes of libpq(eliminateing using putenv()). 2000-01-15 05:38:50 +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
Tom Lane
0e6d72db55 Make PSQLexec's behavior on loss of connection more reasonable;
report original error before attempting reset, not after.
2000-01-14 05:28:31 +00:00
Tom Lane
19ff2e4d55 Make connection-failed messages a little friendlier on
80-column displays...
2000-01-14 04:01:55 +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
6456b17bc1 Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions. 2000-01-10 16:13:23 +00:00
Bruce Momjian
a040281787 Move fixes for >8 indexed fields. 2000-01-10 05:20:26 +00:00
Bruce Momjian
b78769fda2 Fix it's and its to be correct. 2000-01-05 18:23:54 +00:00
Bruce Momjian
eb9bb3de33 Make psql \dT always show descriptions. There is room. 1999-12-31 21:06:19 +00:00
Tom Lane
ec806d72c0 Clean up some minor gcc warnings. 1999-12-20 01:34:19 +00:00
Bruce Momjian
65f694f802 Add cvs. 1999-12-18 00:34:48 +00:00
Bruce Momjian
5c99f9cd84 Fix MULTIBYTE handling in string by using strcat. 1999-12-17 18:05:32 +00:00
Bruce Momjian
1b22a8cb03 Clear paren level flag on \r or any backslash command, rather than
keeping parenlevel unchanged.
1999-12-16 23:54:41 +00:00
Bruce Momjian
1ff0a475ee Fix for psql from Peter. 1999-12-11 21:35:49 +00:00
Bruce Momjian
298845a6f0 Allow ; in () in psql. 1999-12-11 01:03:36 +00:00
Bruce Momjian
3c75d64f40 Remove old file. 1999-12-10 17:46:41 +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
Jan Wieck
a27542c3a8 Added a fflush(stdout) to the \p command required for the
multisession test tool.

Jan
1999-12-10 00:26:35 +00:00
Bruce Momjian
a010be7543 Peter's file removals. 1999-12-07 22:43:03 +00:00
Bruce Momjian
1f64926953 Fix compile error on older patch. 1999-11-30 04:29:57 +00:00
Bruce Momjian
47e51683e6 I pulled this one out via CVS, I hope you can make use of it:
Peter.
1999-11-29 05:28:11 +00:00
Tom Lane
adbf98a77f Fix references to backend/port files so that they actually work. 1999-11-27 19:43:20 +00:00
Bruce Momjian
a7f14616c6 Change // to /* */ 1999-11-26 17:26:38 +00:00
Bruce Momjian
09f185a040 Fix missing prototype psql warning. 1999-11-26 04:36:48 +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
e61e4d460c Fix for psql control-d and .psqlrc that I broke. Fix for \dT with
descriptions enabled.
1999-11-13 19:16:47 +00:00
Bruce Momjian
db12a63ef1 The \p\g fix didn't turn out to be so bad. It even works in other
circumstances:
=> select * from foo\x\t\pset border 0 \p\g\\select * from bar;

Also the release prep update so the sql_help.h is generated before
packaging.

Peter.
1999-11-13 02:04:54 +00:00
Bruce Momjian
2a24ec6f16 In the spirit of TODO item
* Add use of 'const' for varibles in source tree
(which is misspelled, btw.)
I went through the front-end libpq code and did so. This affects in
particular the various accessor functions (such as PQdb() and
PQgetvalue()) as well as, by necessity, the internal helpers they use.

I have been really thorough in that regard, perhaps some people will find
it annoying that things like
char * foo = PQgetvalue(res, 0, 0)
will generate a warning. On the other hand it _should_ generate one. This
is no real compatibility break, although a few clients will have to be
fixed to suppress warnings. (Which again would be in the spirit of the
above TODO.)

In addition I replaced some int's by size_t's and removed some warnings
(and generated some new ones -- grmpf!). Also I rewrote PQoidStatus (so it
actually honors the const!) and supplied a new function PQoidValue that
returns a proper Oid type. This is only front-end stuff, none of the
communicaton stuff was touched.


The psql patch also adds some new consts to honor the new libpq situation,
as well as fixes a fatal condition that resulted when using the -V
(--version) option and there is no database listening.


So, to summarize, the psql you should definitely put in (with or without
the libpq). If you think I went too far with the const-mania in libpq, let
me know and I'll make adjustments. If you approve it, I will also update
the docs.

        -Peter

--
Peter Eisentraut                  Sernanders vaeg 10:115
1999-11-11 00:10:14 +00:00
Bruce Momjian
c6c60302ba Cleanup of psql \copyright 1999-11-10 01:22:37 +00:00
Bruce Momjian
b2c55a02b1 psql makefile fix from Keith Parks 1999-11-08 15:59:59 +00:00
Bruce Momjian
86ef36c907 New NameStr macro to convert Name to Str. No need for var.data anymore.
Fewer calls to nameout.

Better use of RelationGetRelationName.
1999-11-07 23:08:36 +00:00
Bruce Momjian
17d819c093 Fix for recusive exit call from Massimo. 1999-11-06 17:01:29 +00:00
Bruce Momjian
a9ade930da Sort help file names, from Peter Eisentraut 1999-11-06 16:49:06 +00:00
Bruce Momjian
5e3189eaff Update psql banner 1999-11-05 18:21:09 +00:00
Bruce Momjian
f793ac0a16 Update psql display. 1999-11-05 15:44:57 +00:00
Bruce Momjian
3d1db6ddc6 Update \? display. 1999-11-05 02:12:59 +00:00
Bruce Momjian
200e183254 Make pager on by default. 1999-11-05 01:38:58 +00:00
Bruce Momjian
f0a45ccd0a Clean up \? psql display. 1999-11-05 01:25:39 +00:00
Bruce Momjian
754a4428a6 psql banner cleanup 1999-11-05 00:12:52 +00:00
Bruce Momjian
87a8c72a64 clean up startup banner 1999-11-05 00:10:03 +00:00
Bruce Momjian
e6a0e4ed61 Fix EOF/control-D display in psql. 1999-11-04 23:26:02 +00:00
Bruce Momjian
dc16399d8d Update to psql, run pgindent. 1999-11-04 23:17:33 +00:00
Bruce Momjian
0e6652e673 psql cleanup 1999-11-04 23:14:30 +00:00
Bruce Momjian
2323b63631 Update psql with man pages and new version of help. 1999-11-04 22:07:57 +00:00
Bruce Momjian
a45195a191 Major psql overhaul by Peter Eisentraut. 1999-11-04 21:56:02 +00:00
Bruce Momjian
60f3e6b3a5 Make USING in COPY optional. 1999-10-29 23:52:22 +00:00
Bruce Momjian
d79d0a3c0f Fix psql quote missing. 1999-10-27 16:33:45 +00:00