1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-26 23:43:30 +03:00
Commit Graph

5445 Commits

Author SHA1 Message Date
Tom Lane
f1b3af29c1 When a TIMESTAMP, TIME, or INTERVAL precision is specified larger than our
implementation limits, do not issue an ERROR; instead issue a NOTICE and use
the max supported value.  Per pgsql-general discussion of 28-Apr, this is
needed to allow easy porting from pre-7.3 releases where the limits were
higher.

Unrelated change in same area: accept GLOBAL TEMP/TEMPORARY as a synonym
for TEMPORARY, as per pgsql-hackers discussion of 15-Apr.  We previously
rejected it, but that was based on a misreading of the spec --- SQL92's
GLOBAL temp tables are really closer to what we have than their LOCAL ones.
2003-05-04 00:04:10 +00:00
Tom Lane
2df153b0f6 Repair permissions problem in RI triggers: query parsing has to be done
as the correct user, not only query execution.  Per report from Sean
Chittenden.
2003-04-26 22:21:58 +00:00
Tom Lane
66e0ea47a0 Back-patch fixes for zero-column tables in COPY, pg_dump. 2003-04-25 22:14:33 +00:00
Tom Lane
de9c299aba Make [VACUUM] ANALYZE safe on zero-column tables. 2003-04-25 21:29:22 +00:00
Tom Lane
60bc45a107 Fix misbehavior of func_error() on type names containing '%'.
Will patch separately but equivalently in HEAD.
2003-04-23 18:20:10 +00:00
Tom Lane
f094673357 Fix misbehavior of replace() on strings containing '%'.
Will patch separately but equivalently in HEAD.
2003-04-23 18:19:23 +00:00
Tom Lane
a72fd0d60e Prevent palloc(0) error when parent table has zero columns. 2003-04-21 15:20:02 +00:00
Tom Lane
9ccfbe254a Fix char-vs-pg_wchar confusion in p_ere(), per failure report from
Tom O'Dowd.  This fix is not relevant to CVS tip anymore, but we should
fix it in 7.3.*.
2003-04-20 17:37:22 +00:00
Tom Lane
dc3e14d3d5 Fix stupid oversight ... 2003-04-16 04:38:05 +00:00
Tom Lane
d38fdbc939 eqjoinsel's logic for case where MCV lists are not present should
account for NULLs; in hindsight this is obvious since the code for
the MCV-lists case would reduce to this when there are zero entries
in both lists.  Per example from Alec Mitchell.
2003-04-15 05:18:30 +00:00
Tom Lane
811c512f62 Second try at avoiding conflicts with system isblank(). 2003-04-13 04:07:31 +00:00
Tom Lane
041ab272c7 Guard against macro versions of isblank(). 2003-04-12 22:28:40 +00:00
Tatsuo Ishii
5d6b0a43dc Fix encoding conversion function bug.
See following posting for more details.

Subject: Re: [HACKERS] [BUGS] Bug #943: Server-Encoding from EUC_TW to UTF-8 doesn't
From: Tatsuo Ishii <t-ishii@sra.co.jp>
To: michael.enke@wincor-nixdorf.com, pgsql-bugs@postgresql.org
Cc: pgsql-hackers@postgresql.org
Date: Sat, 12 Apr 2003 10:51:45 +0900 (JST)
2003-04-12 08:01:23 +00:00
Tom Lane
8d477bd33a Fix error recovery for SSL_read/SSL_write calls. 2003-04-10 23:03:13 +00:00
Tom Lane
19f60754e1 Remove premature attempt to constant-fold type coercion expressions.
While usually safe, this fails if the coercion function needs the
query snapshot to be set already.  Per example from Nigel Andrews.
2003-04-10 02:47:57 +00:00
Tom Lane
8fe728b009 Back-patch changes to validate page header fields immediately after
reading in any page.  Also back-port the zero_damaged_pages boolean
that determines what to do about it.
2003-04-04 00:32:57 +00:00
Tom Lane
a880697f09 Repair incorrect checking of grouped/ungrouped variables in the presence
of unnamed joins; per pghackers discussion 31-Mar-03.
2003-04-03 18:04:17 +00:00
Tom Lane
8af8be8633 Fix buffer overrun in to_ascii(), per report from Guido Notari. 2003-04-02 21:08:07 +00:00
Tom Lane
28295da0a5 TestConfiguration returns int, not bool. This mistake is relatively
harmless on signed-char machines but would lead to core dump in the
deadlock detection code if char is unsigned.  Amazingly, this bug has
been here since 7.1 and yet wasn't reported till now.  Thanks to Robert
Bruccoleri for providing the opportunity to track it down.
2003-03-31 20:32:50 +00:00
Bruce Momjian
ba4de4e06a Properly document default value of log_min_error_statement in postgresql.conf. 2003-03-30 21:38:13 +00:00
Bruce Momjian
b602639dc6 Backpatch SSL return value changes. 2003-03-30 21:36:44 +00:00
Bruce Momjian
8df03b2c86 [ Backpatch to 7.3.X.]
typing error in src/backend/libpq/be-secure.c ???

Long Description
In src/backend/libpq/be-secure.c: secure_write
on SSL_ERROR_WANT_WRITE call secure_read instead
secure_write again. May be is this a typing error?

Sergey N. Yatskevich (syatskevich@n21lab.gosniias.msk.ru)
2003-03-29 03:57:05 +00:00
Tom Lane
a69550a363 Fix bogus coding of SET DEFAULT ri triggers ... or at least make it less
bogus than it was.  Per bug report from Adrian Pop.
2003-03-27 19:25:52 +00:00
Tom Lane
9ae5b8cb92 GetTupleForTrigger must use outer transaction's command counter for time
qual checking, not GetCurrentCommandId.  Per test case from Steve Wolfe.
2003-03-27 14:33:21 +00:00
Tom Lane
579adfd654 Band-aid patch for Shraibman's 'out of free buffers' bug: disable the
keys_are_unique optimization introduced in 7.3.  A better fix will
appear in 7.4, but I think back-patching it is too risky for the stable
branch.
2003-03-23 21:55:14 +00:00
Tom Lane
2d0cf42cd4 Tweak selectivity and related routines to cope with domains. Per report
from Andreas Pflug.
2003-03-23 01:49:13 +00:00
Tom Lane
cebedc36ed Prevent infinite loop in ln_var() due to roundoff error.
Per report from Dave Marin.
2003-03-14 00:15:41 +00:00
Tom Lane
d144f96bf0 GROUP BY got confused if there were multiple equal() GROUP BY items.
This bug has been latent since 7.0 or maybe even further back, but it
was only exposed when parse_clause.c stopped suppressing duplicate
items (see its rev 1.96 of 18-Aug-02).
2003-03-13 16:58:49 +00:00
Tom Lane
f069bd0560 Tweak dependency code to suppress NOTICEs generated by new method for
cleaning out temp namespaces.  We don't really want the server log to be
cluttered with 'Drop cascades to table foo' every time someone uses a
temp table...
2003-03-06 22:55:03 +00:00
Tom Lane
d8e2689e32 Repair bug reported by Laurent Perez: bad plan generated when UPDATE or
DELETE of an inheritance tree references another inherited relation.
This bug has been latent since 7.1; I'm still not quite sure why 7.1 and
7.2 don't manifest it (at least, they don't crash on a simple test case).
2003-03-05 18:38:26 +00:00
Tom Lane
6b305090ed Prevent clustering on incomplete indexes: partial indexes are verboten,
as are non-amindexnulls AMs unless first column is attnotnull.
2003-03-03 04:37:48 +00:00
Tom Lane
4b60df3aa6 Change EXTRACT(EPOCH FROM timestamp) so that a timestamp without time zone
is assumed to be in local time, not GMT.  This improves consistency with
other operations, which all assume local timezone when it matters.  Per
bug #897.
2003-02-27 21:37:24 +00:00
Tom Lane
1f3e24dee7 If a shutdown request comes in while we're still starting up, don't
service it until after we execute SetThisStartUpID().  Else shutdown
process will write the wrong SUI into the shutdown checkpoint, which
seems likely to be trouble --- although I've not quite figured out
how significant it really is.
2003-02-23 04:48:38 +00:00
Tom Lane
a78e12f96a Repair nasty oversight in bt_split: if the index is temporary, we weren't
updating the left-link from the split page's right sibling.  This could
result in backwards index scans missing some entries.
Same bug exists in HEAD, will be patched later.
2003-02-21 18:24:54 +00:00
Tom Lane
2bba78d605 Fix timestamptz_in so that parsing of 'now'::timestamptz gives right
answer when SET TIMEZONE has been done since the start of the current
transaction.  Per bug report from Robert Haas.
I plan some futher cleanup in HEAD, but this is a low-risk patch for
the immediate issue in 7.3.
2003-02-20 05:25:25 +00:00
Tatsuo Ishii
d1bb0db8dd Back patch for GUC client_encoding variable not being handled
correctly. However the patch for PostgresPollingStatusType() is not
included to avoid 7.3 libpq vs. pre-7.3 backend
compatibility problem. See following thread for more details.

Subject: [HACKERS] client_encoding directive is ignored in postgresql.conf
From: Tatsuo Ishii <t-ishii@sra.co.jp>
Date: Wed, 29 Jan 2003 22:24:04 +0900 (JST)
2003-02-19 14:14:58 +00:00
Tom Lane
c89000f346 Async_NotifyHandler must save and restore ImmediateInterruptOK. Fixes
known problem with failure to respond to 'pg_ctl stop -m fast', and
probable problems if SIGINT or SIGTERM arrives while processing a
SIGUSR2 interrupt that arrived while waiting for a new client query.
2003-02-18 02:53:46 +00:00
Tom Lane
79c049ddaa Fix SPI result logic for case where there are multiple statements of the
same type in a rule.  Per bug report from Pavel Hanak.
2003-02-14 21:12:54 +00:00
Tom Lane
c6d801f3bf Parser was dropping foreign-key constraints on the floor if present in
an ALTER TABLE ADD COLUMN command.  Per bug #896.
2003-02-13 22:50:09 +00:00
Tom Lane
55570581f5 Repair rule permissions-checking bug reported by Tim Burgess 10-Feb-02:
the table(s) modified by the original query would get checked for the
type of write permission needed by a rule query.
2003-02-13 21:40:00 +00:00
Tom Lane
35710e0d76 Prevent timetz2tm() from scribbling on its input in HAVE_INT64_TIMESTAMP case. 2003-02-13 17:04:24 +00:00
Tom Lane
02c614dc85 Use a varno not chosen at random for dummy variables in the top-level
targetlist of a set-operation tree.  I'm not sure that this solution
will really stand the test of time --- perhaps we need to make a special
RTE for such vars to refer to.  But this quick hack fixes Brandon Craig
Rhodes' complaint of 10-Feb-02 about EXCEPT in CREATE RULE, while not
changing any behavior in the better-tested cases where leftmostRTI is
one anyway.
2003-02-11 04:13:39 +00:00
Tom Lane
521d70f661 Revise mechanism for getting rid of temp tables at backend shutdown.
Instead of grovelling through pg_class to find them, make use of the
handy dandy dependency mechanism: just delete everything that depends
on our temp schema.  Unlike the pg_class scan, the dependency mechanism
is smart enough to delete things in an order that doesn't fall foul of
any dependency restrictions.  Fixes problem reported by David Heggie:
a temp table with a serial column may cause a backend FATAL exit at
shutdown time, if it chances to try to delete the temp sequence first.
2003-02-07 01:33:39 +00:00
Tom Lane
c228ef1587 Avoid generating relid lists with duplicate entries. Fixes bugs
reported by Stefanos Harhalakis 2/2/2003.
2003-02-07 00:02:43 +00:00
Tatsuo Ishii
de42a5f53d Fix regexp slowness reported by Wade Klaver. 2003-02-06 00:00:24 +00:00
Tom Lane
47729caf2d Allow qualified type names in CREATE CAST, DROP CAST. Also allow the
construction 'SETOF type[]' which for some reason was previously
overlooked (you'd have to name the array type directly to make it work).
2003-02-05 20:16:55 +00:00
Tom Lane
e59750d684 Fix nodeUnique to behave correctly when reversing direction after reaching
either end of subplan results.  This prevents misbehavior of cursors
on SELECT DISTINCT ... queries.  Per bug report 1-Feb-02.
2003-02-02 19:09:08 +00:00
Tom Lane
d77c6396bb Remove restriction that cast functions cannot be volatile. This
restriction was debatable to begin with, but it has now become obvious
that it breaks forward-porting of user-defined types; contrib/lo being
the most salient example.
2003-02-01 22:09:41 +00:00
Tom Lane
c80184552f Fix assign_session_authorization() to not be confused by all-numeric
user names.  Per recent reports.
2003-02-01 18:31:37 +00:00
Tom Lane
b52fe8dcc8 Tweak bison build rules so that we get the same error messages from
bison 1.875 and later as we did from earlier bison releases.  Eventually
we will probably want to adopt the newer message spelling ... but not yet.
Per recent discussion on pgpatches.
Note: I didn't change the build rules for bootstrap, ecpg, or plpgsql
grammars, since these do not affect regression test results.
2003-01-31 20:58:28 +00:00