1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00
Commit Graph

16898 Commits

Author SHA1 Message Date
a0bf1a7f2e Fix pg_dump to dump serial columns as serials. Per pghackers discussion,
cause SERIAL column declaration not to imply UNIQUE, so that this can be
done without creating an extra index.
2002-08-19 19:33:36 +00:00
6ebc90b045 Remove Ident nodetype in favor of using String nodes; this fixes some
latent wrong-struct-type bugs and makes the coding style more uniform,
since the majority of places working with lists of column names were
already using Strings not Idents.  While at it, remove vestigial
support for Stream node type, and otherwise-unreferenced nodes.h entries
for T_TupleCount and T_BaseNode.
NB: full recompile is recommended due to changes of Node type numbers.
This shouldn't force an initdb though.
2002-08-19 15:08:47 +00:00
10b374aecf Fix bug in pg_convert() per report from MaC.Yui.
It pfree() wrong pointer.
2002-08-19 04:08:08 +00:00
d35dc342f1 Fix broken tag. 2002-08-19 04:05:00 +00:00
f4ad5e8d18 Clean up leftover bugs from recent COPY feature patch --- missed
required changes to copyfuncs/equalfuncs.
2002-08-19 00:40:15 +00:00
5f6a27f8f9 Add missing copyfuncs/equalfuncs entries, including T_Null which has
been missing forever; surprising it wasn't noticed before.  The other
additions are, um, sloppiness in certain recent feature additions.
2002-08-19 00:11:53 +00:00
6fb05e06a3 Improve obsolete comment. 2002-08-19 00:10:03 +00:00
0556e9cfae Fix small copy-and-pasteo. 2002-08-18 21:05:32 +00:00
e1b040a7c3 Fix potential buffer overrun in cube_out(), per report from
Bruno Wolff.
2002-08-18 20:15:52 +00:00
22bfa72068 Remove optimization whereby parser would make only one sort-list entry
when two equal() targetlist items were to be added to an ORDER BY or
DISTINCT list.  Although indeed this would make sorting fractionally
faster by sometimes saving a comparison, it confuses the heck out of
later stages of processing, because it makes it look like the user
wrote DISTINCT ON rather than DISTINCT.  Bug reported by joe@piscitella.com.
2002-08-18 18:46:15 +00:00
315a9ca32e Make CREATE CONSTRAINT TRIGGER check for REFERENCES privilege on both
master and slave tables.
2002-08-18 11:20:05 +00:00
c828ec8820 Make pg_dump output more portable and more pleasing to look at.
The -n and -N options were removed.  Quoting is now smart enough to
supply quotes if and only if necessary.

Numerical types are now printed without quotes, except in cases of
special values such as NaN.

Boolean values printed as true and false.

Most string literals now do not escape whitespace characters (newlines,
etc.) for portability.

SET SESSION AUTHORIZATION argument is a string literal, to follow SQL.

Made commands output by pg_dump use consistent spacing and indentation.
2002-08-18 09:36:26 +00:00
41298cf8a6 Add #include <sys/time.h>. 2002-08-18 03:47:08 +00:00
2efb8e8070 Code review for 'at character n' patch --- point at proper end of
a token scanned by multiple lex rules.
2002-08-18 03:35:08 +00:00
2c6b34d959 Add db-local user names, per discussion on hackers. 2002-08-18 03:03:26 +00:00
4b26e7d24b More changes to match new error format. 2002-08-18 03:00:17 +00:00
c9a524000d Use variable for format to suppress overly-anal-retentive gcc warning
about %c
2002-08-18 02:48:41 +00:00
06b604b737 Modify regression tests to match new error reporting format from Gavin. 2002-08-18 02:48:29 +00:00
3dd8369f77 Back out tcl patch, per Tom Lane:
Everytime if I do PQconsumeInput (when the backend channel gets
readable) I check for the return value. (0 == error) and generate a
notification manually, e.g. fixed string connection_closed) and pass it to the
2002-08-18 01:39:43 +00:00
5bf6af6cf4 Add includes for prototype using timeval. 2002-08-18 01:35:40 +00:00
1c69f13447 Clean up compile warnings. 2002-08-18 00:06:01 +00:00
e16591038a Fix typo. 2002-08-17 20:24:51 +00:00
d04e9137c9 Reverse out XLogDir/-X write-ahead log handling, per discussion.
Original patch from Thomas.
2002-08-17 15:12:07 +00:00
7c02c86d0f Add:
> * Use dependency information to dump data in proper order
2002-08-17 15:09:41 +00:00
a8d27511c7 Done:
> 	o -Add command to display locks
2002-08-17 13:14:07 +00:00
fc68e44062 Add lock file. 2002-08-17 13:11:43 +00:00
54124240ae In that case, attached is a patch which locates the beginning of the
offending token more efficiently (per your suggestion of using
scanbuf). The new patch does the same as before:

template1=# select * frum pg_class;
ERROR:  parser: parse error at or near "frum" at character 10

It also implement's Tom's suggestion:

template1=# select * from pg_class where\g
ERROR:  parse: parse error at end of input

Gavin Sherry
2002-08-17 13:06:50 +00:00
82119a696e [ Newest version of patch applied.]
This patch is an updated version of the lock listing patch. I've made
the following changes:

    - write documentation
    - wrap the SRF in a view called 'pg_locks': all user-level
      access should be done through this view
    - re-diff against latest CVS

One thing I chose not to do is adapt the SRF to use the anonymous
composite type code from Joe Conway. I'll probably do that eventually,
but I'm not really convinced it's a significantly cleaner way to
bootstrap SRF builtins than the method this patch uses (of course, it
has other uses...)

Neil Conway
2002-08-17 13:04:19 +00:00
f0ed4311b6 Add libpq connection timeout parameter.
Denis A Ustimenko
2002-08-17 12:33:18 +00:00
b7214a877c What I have done for libpgtcl:
Everytime if I do PQconsumeInput (when the backend channel gets
readable) I check for the return value. (0 == error) and generate a
notification manually, e.g. fixed string connection_closed) and pass it to the
TCL event queue. The only other thing I had to do is to comment out removing
all pending events in PgStopNotifyEventSource whenever the connection was
unexpectedly closed (so the manually generated event will not be deleted).

A broken backend connection triggers a notify event to the client (fixed
notification string "connection_closed") so proper action can be taken to switch
to another database server etc. Remember that this is event driven. If you have
applications, that have idle database connections most of the time, you'll get
immediate feedback of a dying server. Upon connection to the server issue a
pg_notify for notify event "connection_closed" and whenever the backend crashes
(which it does do in very very rare cases) you get an event driven recovery. (of
course the Tcl-Event loop has to be processed). Issuing a notification
"connection_closed" on a still working database could be used for switching to
another db-server (which I've actually impelemented right now).

Gerhard Hintermayer
2002-08-17 12:19:31 +00:00
b813554dbd Improve documentation of trigger firing queue handling, cleanup.
Neil Conway
2002-08-17 12:15:49 +00:00
2132ac89bf Editorial corrections. 2002-08-17 05:07:18 +00:00
8bca70fad5 Broken markup. 2002-08-17 04:09:18 +00:00
675a7b8280 Cleanup. 2002-08-17 04:06:48 +00:00
cdfc54db6f Fix broken Makefiles. 2002-08-17 04:03:36 +00:00
d383b734f8 Add missing links. 2002-08-17 03:38:43 +00:00
08f245bfd4 Add doc file for pg_resetxlog. 2002-08-17 02:45:29 +00:00
33e3c9b085 Add files for pg_resetxlog. 2002-08-17 02:44:24 +00:00
6945ea3445 Move pg_controldata to /bin. 2002-08-17 02:43:08 +00:00
a208ea72bc Modify pg_dump to dump foreign-key constraints as constraints, not as
sets of triggers.  Also modify psql \d command to show foreign key
constraints as such and hide the triggers.  pg_get_constraintdef()
function added to backend to support these.  From Rod Taylor, code
review and some editorialization by Tom Lane.
2002-08-16 23:01:21 +00:00
8dabef838c Code review for patch to dump primary and unique constraints as
constraints, rather than as CREATE INDEX commands.
2002-08-16 21:03:42 +00:00
ad7d3bddea Make domain types indexable. Rod Taylor & Tom Lane. 2002-08-16 20:55:09 +00:00
141539c31e Improve wording. 2002-08-16 20:36:25 +00:00
cd1f4087c9 Move pg_controldata from /contrib to src/bin. 2002-08-16 20:34:06 +00:00
7ffe65fefb removed duplicate code from jdbc2 classes 2002-08-16 19:37:57 +00:00
b3766d9fa5 applied patch to fix encoding bug supplied by Jun Kawai 2002-08-16 19:35:46 +00:00
369e2b6afa Applied patch for MD5 bug submitted by Jun Kawai 2002-08-16 19:34:57 +00:00
875364e5ff Performance tweaks to StringBuffer suggested by hhaag@gmx.de
Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/util/PGbytea.java
2002-08-16 17:51:38 +00:00
ab0f98518c Add "few":
> * Reserve last few process slots for super-user if max_connections reached
2002-08-16 17:05:18 +00:00
fa9d7c1c13 Add blank line. 2002-08-16 15:13:13 +00:00