Commit Graph

636 Commits

Author SHA1 Message Date
Peter Eisentraut 11193c8a20 For INSERTs, one can now tab complete DEFAULT VALUES.
from Liam Stewart
2001-08-30 13:17:03 +00:00
Bruce Momjian 7208518720 Attached is a trivial patch to add ANALYZE to the tab complete file in
psql.

Randy Hall
2001-08-01 18:45:50 +00:00
Peter Eisentraut e3cade2e29 Re-add explicit declaration of filename_completion_function(), which seems
to be missing in some header files (on OpenBSD 2.8?).
2001-06-20 18:39:14 +00:00
Bruce Momjian 92f450652c The attached patch enables PostgreSQL CVS to build cleanly under Cygwin
when built against readline 4.2.  Specifically, it handles the deprecation
of

    filename_completion_function()

with preference for

    rl_filename_completion_function()

Although, I was motivated by Cygwin support, IMO this patch is appropriate
for all platforms.  To quote from the readline source:

    #if 0
    /* Backwards compatibility (compat.c).  These will go away sometime. */
    ...
    extern READLINE_EXPORT(char, *filename_completion_function) ...
    #endif

Note that this patch is modeled after the one by Peter Eisentraut for
completion_matches():

    http://www.ca.postgresql.org/~petere/readline42.html
I tested this patch under the following environments:

    Cygwin with readline 4.1
    Cygwin with readline 4.2
    Linux with readline 2.2.1
    Linux with readline 4.2

and it behaved as expected.

Jason Tishler
2001-06-11 22:12:48 +00:00
Peter Eisentraut 1c1c58c76c Add SET SESSION AUTHORIZATION command. 2001-05-08 21:06:43 +00:00
Peter Eisentraut 232724af0d Add \cd command to psql. 2001-05-07 19:31:33 +00:00
Peter Eisentraut eb1b164317 Work with Readline 4.2. 2001-04-14 22:55:02 +00:00
Tom Lane d0f6ae68f5 random_seed => seed ... 2001-03-30 04:50:47 +00:00
Bruce Momjian 9e1552607a pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Tom Lane 9c9936587c Implement COMMIT_SIBLINGS parameter to allow pre-commit delay to occur
only if at least N other backends currently have open transactions.  This
is not a great deal of intelligence about whether a delay might be
profitable ... but it beats no intelligence at all.  Note that the default
COMMIT_DELAY is still zero --- this new code does nothing unless that
setting is changed.
Also, mark ENABLEFSYNC as a system-wide setting.  It's no longer safe to
allow that to be set per-backend, since we may be relying on some other
backend's fsync to have synced the WAL log.
2001-02-26 00:50:08 +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
Peter Eisentraut 3b2b7eb19e Remove incorrect use of rl_special_prefixes until further evaluation. 2000-12-31 11:57:58 +00:00
Tom Lane a27b691e29 Ensure that all uses of <ctype.h> functions are applied to unsigned-char
values, whether the local char type is signed or not.  This is necessary
for portability.  Per discussion on pghackers around 9/16/00.
2000-12-03 20:45:40 +00:00
Peter Eisentraut 13dbd0276a Final(?) GUC clean-up. Update psql tab completion. 2000-12-03 14:36:47 +00:00
Tom Lane 4ad9fe4ce5 Teach psql about new relkind for views. 2000-10-25 20:36:52 +00:00
Peter Eisentraut 831e78e0c4 Better coding of readline tests 2000-10-03 19:50:21 +00:00
Peter Eisentraut c4e63f70fa Added new commands and intelligence to psql tab completion. 2000-06-25 14:25:51 +00:00
Peter Eisentraut 8322072188 Spello SERIALIZED -> SERIALIZABLE in psql tab completion 2000-05-05 08:44:27 +00:00
Tom Lane f084cc4939 Fix still more static-declaration-vs-nonstatic-definition glitches.
gcc doesn't think these are a problem, but somewhere out there is a
compiler that will spit up.
2000-04-21 03:01:54 +00:00
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Tom Lane 0e314d747e Add safety check on expression nesting depth. Default value is set by
a config.h #define, and the runtime value can be controlled via SET.
2000-03-17 05:29:07 +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 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
Bruce Momjian 78693c89d7 Clean up include files use in psql. 2000-02-16 13:15:26 +00:00
Tom Lane b1577a7c78 New cost model for planning, incorporating a penalty for random page
accesses versus sequential accesses, a (very crude) estimate of the
effects of caching on random page accesses, and cost to evaluate WHERE-
clause expressions.  Export critical parameters for this model as SET
variables.  Also, create SET variables for the planner's enable flags
(enable_seqscan, enable_indexscan, etc) so that these can be controlled
more conveniently than via PGOPTIONS.

Planner now estimates both startup cost (cost before retrieving
first tuple) and total cost of each path, so it can optimize queries
with LIMIT on a reasonable basis by interpolating between these costs.
Same facility is a win for EXISTS(...) subqueries and some other cases.

Redesign pathkey representation to achieve a major speedup in planning
(I saw as much as 5X on a 10-way join); also minor changes in planner
to reduce memory consumption by recycling discarded Path nodes and
not constructing unnecessary lists.

Minor cleanups to display more-plausible costs in some cases in
EXPLAIN output.

Initdb forced by change in interface to index cost estimation
functions.
2000-02-15 20:49:31 +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
Tom Lane 7cc0d6ae9d Fix tab-complete so it works with old versions of readline that don't
have the rl_completion_append_character variable.  The tab completion
behavior doesn't seem to be quite perfect in that situation, but it's
better than failing to build at all...
2000-01-21 23:32:36 +00:00
Peter Eisentraut f565cf41ab another set of cleanups 2000-01-18 23:30:24 +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 b78769fda2 Fix it's and its to be correct. 2000-01-05 18:23:54 +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 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