1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-24 14:22:24 +03:00
Commit Graph

21829 Commits

Author SHA1 Message Date
b7edacccbe Fix back-branch pg_regress scripts to try the "canonical" expected file if we
tried a variant file from resultmap and it didn't match.  This is already done
in HEAD's C-code version, and is needed because OpenBSD has recently migrated
to a more standard handling of float underflow --- see buildfarm results
from emu.
2006-10-09 01:45:41 +00:00
e407ca3a7b Fix ancient oversight in psql's \d pattern processing code: when seeing two
quote chars inside quote marks, should emit one quote *and stay in inquotes
mode*.  No doubt the lack of reports of this have something to do with the
poor documentation of the feature ...
2006-10-07 22:21:44 +00:00
a5d892b1c9 Fix string_to_array() to correctly handle the case where there are
overlapping possible matches for the separator string, such as
string_to_array('123xx456xxx789', 'xx').
Also, revise the logic of replace(), split_part(), and string_to_array()
to avoid O(N^2) work from redundant searches and conversions to pg_wchar
format when there are N matches to the separator string.
Backpatched the full patch as far as 8.0.  7.4 also has the bug, but the
code has diverged a lot, so I just went for a quick-and-dirty fix of the
bug itself in that branch.
2006-10-07 00:11:59 +00:00
a222a158b0 Fix SysCacheGetAttr() to handle the case where the specified syscache has not
been initialized yet.  This can happen because there are code paths that call
SysCacheGetAttr() on a tuple originally fetched from a different syscache
(hopefully on the same catalog) than the one specified in the call.  It
doesn't seem useful or robust to try to prevent that from happening, so just
improve the function to cope instead.  Per bug#2678 from Jeff Trout.  The
specific example shown by Jeff is new in 8.1, but to be on the safe side
I'm backpatching 8.0 as well.  We could patch 7.x similarly but I think
that's probably overkill, given the lack of evidence of old bugs of this ilk.
2006-10-06 18:23:41 +00:00
4af74cc007 date_trunc also accepts 'quarter'. Noted by Yoshihisa Nakano. 2006-10-01 18:54:40 +00:00
9acbb81dd7 Fix overly enthusiastic Assert introduced in 8.1: it's expecting a
CaseTestExpr, but forgot that the optimizer is sometimes able to replace
CaseTestExpr by Const.
2006-10-01 17:23:51 +00:00
e73687f2ec Backpatch to 8.1.X fix for to_timestamp() where "PM/AM" specification
was eating too much user input, producing incorrect results.
2006-09-04 19:29:18 +00:00
1e64862ab3 Clean up rather sloppy fix in HEAD for the ancient bug that CREATE CONVERSION
didn't create a dependency from the new conversion to its schema.  Back-patch
to all supported releases.
2006-08-31 17:31:40 +00:00
780451b43d Fix mistyping 2006-08-29 15:48:30 +00:00
60a25e6f6f Add description of tsvector type layout 2006-08-29 13:57:11 +00:00
3538b740f3 Remove pos comparison in silly_cmp_tsvector(): it is not a semantically significant 2006-08-29 13:40:11 +00:00
a3cb2221f3 Fix incorrect length of lexemes in silly_cmp_tsvector() 2006-08-29 13:32:21 +00:00
747b82aa6a Fix regression tests: after changing comparing function
order is changed.
2006-08-25 07:39:22 +00:00
2ec2b2caf0 Fix compare bug for tsvector: problem was in aligment. Per Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> and Phil Frost <indigo@bitglue.com> 2006-08-24 17:38:00 +00:00
368f3b2cca In new "invalid byte sequence" error hint, call it "error", not
"failure".
2006-08-22 12:11:38 +00:00
d16e2ceb59 Add hint for "invalid byte sequence for encoding" error message,
suggesting review of client_encoding.
2006-08-22 03:38:13 +00:00
574878f110 Remove obsolete tip about casting bool to int, per Taiki Yamaguchi. 2006-08-21 16:24:02 +00:00
331428205b Add installcheck-parallel target to top level makefiles. 2006-08-18 19:58:34 +00:00
9084f700e5 Backported buffer overrun from HEAD 2006-08-18 16:33:29 +00:00
017d79b10d Applied the connect patch from HEAD. 2006-08-18 16:00:06 +00:00
7ed55aac1c Get rid of "lookahead" functionality in plpgsql's yylex() function,
and instead make the grammar production for the RETURN statement do the
heavy lifting.  The lookahead idea was copied from the main parser, but
it does not work in plpgsql's parser because here gram.y looks explicitly
at the scanner's yytext variable, which will be out of sync after a
failed lookahead step.  A minimal example is

create or replace function foo() returns void language plpgsql as '
begin
  perform return foo bar;
end';

which can be seen by testing to deliver "foo foo bar" to the main parser
instead of the expected "return foo bar".  This isn't a huge bug since
RETURN is not found in the main grammar, but it could bite someone who
tried to use "return" as an identifier.

Back-patch to 8.1.  Bug exists further back, but HEAD patch doesn't apply
cleanly, and given the lack of field complaints it doesn't seem worth
the effort to develop adjusted patches.
2006-08-14 00:46:59 +00:00
e4596d8e60 Fix core dump in duration logging for a V3-protocol Execute message
when what's being executed is a COMMIT or ROLLBACK.  Per report from
Sergey Koposov.  Backpatch to 8.1; 8.0 and before don't have the bug
due to lack of any logging at all here.
2006-08-13 22:18:22 +00:00
b6f564c012 Move Win32 inline define to win32.h so it is found, rather than c.h.
(cleaner)
2006-08-10 01:45:17 +00:00
512d7eab82 Move "#define inline __inline" from port/win32.h to c.h because Win32
interface builds like libpq need it.

Backpatch addition to 8.1.X.
2006-08-10 01:35:28 +00:00
a42c545f62 Round microseconds on setitimer upwards. 2006-08-09 21:18:15 +00:00
83b27b9180 On Win32, make minimum setitimer() sleep be 1ms, so sleeps < 1ms aren't
rounded down to zero.

Backpatch to 8.1.X.
2006-08-09 20:41:07 +00:00
1e35f9aa04 Fix statement_timeout on Win32 so that it properly treats micro-seconds
as micro-seconds, rather than as 100 microseconds, as it does now.  This
actually fixes all setitimer calls on Win32, but statement_timeout is
the most visible fix.

Backpatch to 8.1.X.  8.0 works as documented.
2006-08-09 17:47:06 +00:00
73761f3659 Fix bug introduced by last patch, thanks again to Mario Weilguni <mweilguni@sime.com> 2006-08-08 15:45:24 +00:00
804e7c5c53 Back-port HEAD's configure fixes to select appropriate compiler switches
for Intel's icc and AIX's xlc.
2006-08-07 20:08:44 +00:00
e33ab5b6d5 fix bug about modifying value in shared buffer,
what was a reason to corrupt index.
Thank to Mario Weilguni <mweilguni@sime.com> to
discover a bug.
2006-08-07 17:40:20 +00:00
381ebcd21f Fix references to the Options section in the pgcrypto documentation.
Patch from Michael Fuhr.
2006-08-05 00:29:14 +00:00
dc84334f1e Fix documentation error: GRANT/REVOKE for roles only accept role names
as grantees, not PUBLIC ... and you can't say GROUP either.  Noted by
Brian Hurt.
2006-08-02 16:30:00 +00:00
8aa826a965 Fix confusion between COPY FROM and COPY TO, per Gavin Sharry and Arul Shaji. 2006-07-31 01:13:58 +00:00
e482136c04 prevent multiplexing Windows kernel event objects we listen for across various sockets - should fix the occasional stats test regression failures we see. 2006-07-29 20:00:00 +00:00
271852a021 Fix table title. 2006-07-28 16:22:02 +00:00
87953b3d60 Make it clearer that not every Postgres character set can be used as a
server-side character set.
2006-07-28 15:33:28 +00:00
6779710f26 Fix spectacular misspellings of procedural language names 2006-07-24 16:55:42 +00:00
69f3a5c9ed Fix oversight in sizing of shared buffer lookup hashtable. Because
BufferAlloc tries to insert a new mapping entry before deleting the old one
for a buffer, we have a transient need for more than NBuffers entries ---
one more in 8.1, and as many as NUM_BUFFER_PARTITIONS more in CVS HEAD.
In theory this could lead to an "out of shared memory" failure if shmem
had already been completely claimed by the time the extra entries were
needed.
2006-07-23 18:34:50 +00:00
eda117dfa0 Hmm, seems --disable-spinlocks has been broken for awhile and nobody
noticed.  Fix SpinlockSemas() to report the correct count considering
that PG 8.1 adds a spinlock to each shared-buffer header.
2006-07-22 21:04:46 +00:00
f141880150 Don't try to truncate multixact SLRU files in checkpoints done during xlog
recovery.  In the first place, it doesn't work because slru's
latest_page_number isn't set up yet (this is why we've been hearing reports
of strange "apparent wraparound" log messages during crash recovery, but
only from people who'd managed to advance their next-mxact counters some
considerable distance from 0).  In the second place, it seems a bit unwise
to be throwing away data during crash recovery anwyway.  This latter
consideration convinces me to just disable truncation during recovery,
rather than computing latest_page_number and pushing ahead.
2006-07-20 00:46:56 +00:00
74dac69e3c Ensure that we retry rather than erroring out when send() or recv() return
EINTR; the stats code was failing to do this and so were a couple of places
in the postmaster.  The stats code assumed that recv() could not return EINTR
if a preceding select() showed the socket to be read-ready, but this is
demonstrably false with our Windows implementation of recv(), and it may
not be the case on all Unix variants either.  I think this explains the
intermittent stats regression test failures we've been seeing, as well
as reports of stats collector instability under high load on Windows.

Backpatch as far as 8.0.
2006-07-16 18:17:23 +00:00
78e8400a52 Add dependency to fix parallel-make race condition. Alexander Dupuy 2006-07-14 16:45:48 +00:00
0c1db67f6a Correct the description of the pg_get_viewdef() function. Do some nearby
SGML cleanup: sort table entries alphabetically.
2006-07-11 19:11:27 +00:00
8d716f0e47 Remove no-longer-needed configure test for krb5_encrypt(), per Jim Gates. 2006-07-11 16:15:03 +00:00
f446ede326 Fix bug corrupting query in gist consistent function.
Thank to Mario Weilguni <mweilguni@sime.com> to discover a bug.
2006-07-11 16:02:50 +00:00
e0bb171960 Fix ALTER TABLE to check pre-existing NOT NULL constraints when rewriting
a table.  Otherwise a USING clause that yields NULL can leave the table
violating its constraint (possibly there are other cases too).  Per report
from Alexander Pravking.
2006-07-10 22:10:47 +00:00
fe204535a7 Backpatch dbmirror fix for escape handling.
> Upstream confirmed my reply in the last mail in [1]: the complete
> escaping logic in DBMirror.pl is seriously screwew.
>
> [1] http://archives.postgresql.org/pgsql-bugs/2006-06/msg00065.php

I finally found some time to debug this, and I think I found a better
patch than the one you proposed. Mine is still hackish and is still a
workaround around a proper quoting solution, but at least it repairs
the parsing without introducing the \' quoting again.

I consider this a band-aid patch to fix the recent security update.
PostgreSQL gurus, would you consider applying this until a better
solution is found for DBMirror.pl?

Olivier, can you please confirm that the patch works for you, too?

Backpatched to 8.0.X.

Martin Pitt
2006-07-06 01:57:34 +00:00
bf1cd364b6 Fixed remaining Coverity bugs. 2006-07-05 10:50:06 +00:00
8728d4aba9 Fix memory leak introduced in the prior commit, detected by Tom Lane. 2006-06-30 16:55:41 +00:00
55a39e0b0b Fix use-after-free error reported by Neil Conway. 2006-06-30 15:06:16 +00:00