Commit Graph

18639 Commits

Author SHA1 Message Date
4d47db363b Fix typo in recent Win32 typedef change. 2004-10-05 14:27:07 +00:00
2def476de3 Remove unused Win32 defines, convert them to typdefs, per suggestion
from Peter.
2004-10-05 13:48:35 +00:00
a79f8195de '::' is no longer interpreted as a variable in a prepare statement. 2004-10-05 10:48:37 +00:00
af7849f184 License cleanup: crypt.c and qsort.c to latest NetBSD CVS sources, to
pickup license clarification (3-clause BSD is now used). Add license
terms to memcmp.c (also from NetBSD), which previously had none.
Finally, pickup an upstream fix to crypt.c (const-ify some arrays).
2004-10-05 00:12:49 +00:00
6c61af6654 Remove arithmetic operators on the 1-byte-char datatype, as per proposals
made several times in the past.  Add coercion functions between "char"
and integer so that a workaround is possible if needed.

Initdb forced.
2004-10-04 22:49:59 +00:00
1ab415596d Correct the volatility labeling of ten timestamp-related functions,
per discussion from Friday.  initdb not forced in this commit but I intend
to do that later.
2004-10-04 22:13:14 +00:00
4c77cbb272 PortalRun must guard against the possibility that the portal it's
running contains VACUUM or a similar command that will internally start
and commit transactions.  In such a case, the original caller values of
CurrentMemoryContext and CurrentResourceOwner will point to objects that
will be destroyed by the internal commit.  We must restore these pointers
to point to the newly-manufactured transaction context and resource owner,
rather than possibly pointing to deleted memory.
Also tweak xact.c so that AbortTransaction and AbortSubTransaction
forcibly restore a sane value for CurrentResourceOwner, much as they
have always done for CurrentMemoryContext.  I'm not certain this is
necessary but I'm feeling paranoid today.
Responds to Sean Chittenden's bug report of 4-Oct.
2004-10-04 21:52:15 +00:00
ee7de3d662 Make sure no libs use libpgport by removing it from the link line. 2004-10-04 20:36:12 +00:00
2e8252d67a Fix MinGW link failure with new libpgport processing. 2004-10-04 20:32:58 +00:00
b5ddfb4bd0 Readd -DFRONTEND to client makefiles because it still affects win32.h
defines.
2004-10-04 18:05:55 +00:00
63dabb39cd Fix warnings from crypt.c compile. 2004-10-04 15:17:17 +00:00
f95ff4b978 Comment out unused variable. 2004-10-04 15:09:27 +00:00
9a31c9b7b8 Suppress getppid test on WIN32, per Dave Page. 2004-10-04 14:55:17 +00:00
4171bb869f Detect overflow in integer arithmetic operators (integer, smallint, and
bigint variants).  Clean up some inconsistencies in error message wording.
Fix scanint8 to allow trailing whitespace in INT64_MIN case.  Update
int8-exp-three-digits.out, which seems to have been ignored by the last
couple of people to modify the int8 regression test, and remove
int8-exp-three-digits-win32.out which is thereby exposed as redundant.
2004-10-04 14:42:48 +00:00
24201b4bc6 Make libpgport be front-end only and make libpgport_srv be a backend
library that uses palloc, ereport, etc.  This simplifies the makefiles
for client applications.
2004-10-04 13:43:59 +00:00
8d5ff6bad1 Translation update 2004-10-03 20:29:24 +00:00
0654f0f669 Translation updates 2004-10-03 20:24:26 +00:00
b3c4d69852 Add regression test inspired by Sebastian Böck. 2004-10-03 00:13:29 +00:00
47aa95e951 Clean up handling of inherited-table update queries, per bug report
from Sebastian Böck.  The fix involves being more consistent about
when rangetable entries are copied or modified.  Someday we really
need to fix this stuff to not scribble on its input data structures
in the first place...
2004-10-02 22:39:49 +00:00
b3f2b19218 Update length from 75 to 79. 2004-10-02 01:10:58 +00:00
125bf342fd Convert pg_stat_get_backend_idset to use the existing SRF support.
This seems the cleanest way of fixing its lack of a shutdown callback,
which was preventing it from working correctly in a query that didn't
run it to completion.  Per bug report from Szima GÄbor.
2004-10-01 21:03:42 +00:00
b62aa83f0e fmgr_security_definer had better do a PG_TRY to ensure the outer userid
is restored on error exit.
2004-10-01 20:39:54 +00:00
c8196c87a7 Adjust postmaster to recognize that a lockfile containing its parent's PID
must be stale.  Tweak example startup scripts to not use pg_ctl but launch
the postmaster directly, thereby ensuring that only the postmaster's direct
parent shell will be a postgres-owned process.  In combination these should
fix the longstanding problem of the postmaster sometimes refusing to start
during reboot because it thinks the old lockfile is not stale.
2004-10-01 18:30:25 +00:00
8bbfa16624 Don't assume PQdb() will return a valid result from a failed connection. 2004-10-01 17:34:19 +00:00
bbd1e1cc68 Don't assume PQdb() will return a valid result from a failed connection. 2004-10-01 17:25:55 +00:00
b1f8a37aa7 Fallout from changing index locking rules: we can reduce the strength
of locking used by REINDEX.  REINDEX needs only ShareLock on the parent
table, same as CREATE INDEX, plus an exclusive lock on the specific index
being processed.
2004-10-01 17:11:50 +00:00
4c5e810fcd Code review for NOWAIT patch: downgrade NOWAIT from fully reserved keyword
to unreserved keyword, use ereport not elog, assign a separate error code
for 'could not obtain lock' so that applications will be able to detect
that case cleanly.
2004-10-01 16:40:05 +00:00
b3f2f6ebec Use 'override' when appending text to LDFLAGS, so the build doesn't break
if the user has defined LDFLAGS themselves.
2004-10-01 02:06:52 +00:00
d2af5f8a3e Adjust index locking rules as per my proposal of earlier today. You
now are supposed to take some kind of lock on an index whenever you
are going to access the index contents, rather than relying only on a
lock on the parent table.
2004-09-30 23:21:26 +00:00
abc6441d60 Remove unnecessary use of index_open just to get the index name. 2004-09-30 17:42:42 +00:00
bb6a78829e isinf.c needs <float.h> on some platforms, per Darcy Buskermolen. 2004-09-30 16:38:39 +00:00
f065957062 Come to think of it, functions in FROM have the same syntactic restriction
as CREATE INDEX did, and can be fixed the same way, for another small
improvement in usability and reduction in grammar size.
2004-09-30 00:24:27 +00:00
912c27f9c2 Split out everything that looks like a function call from c_expr into
a separate production func_expr.  This allows us to accept all these
variants in the backwards-compatible syntax for creating a functional
index; which beats documenting exactly which things work and which don't.
Interestingly, it also seems to make the generated state machine a little
bit smaller.
2004-09-29 23:39:20 +00:00
0fb3152ea9 Minor adjustments to improve the accuracy of our computation of required
shared memory size.
2004-09-29 15:15:56 +00:00
e7cb681618 Adjust obsolete comment about memory needs for lock table. 2004-09-28 21:19:30 +00:00
3a246cc285 Arrange to preallocate all required space for the buffer and FSM hash
tables in shared memory.  This ensures that overflow of the lock table
creates no long-lasting problems.  Per discussion with Merlin Moncure.
2004-09-28 20:46:37 +00:00
70c8fcb287 An include path got missed out of the patch - see the attached fix.
This also adds debug build support to src/bin/psql/win32.mak.

Dave Page
2004-09-28 16:17:26 +00:00
1ad6878276 Revert patch that removed BUFSIZ usage. The memory has to hold the
structures plus pointers used by the structure.
2004-09-28 00:07:01 +00:00
dd67707a64 Small WIN32_CLIENT_ONLY cleanup for new build patch. 2004-09-27 23:58:09 +00:00
b534a5605f Remove use of large BUFSIZ for buffers and use the proper struct sizes.
This greatly helps threaded libpq programs.
2004-09-27 23:39:14 +00:00
e1c8b37afb Add new macro as shorthand for MS VC and Borland C++:
+ #if   defined(_MSC_VER) || defined(__BORLANDC__)
+ #define       WIN32_CLIENT_ONLY
+ #endif
2004-09-27 23:24:45 +00:00
e017051006 More MS VC and BCC psql compile cleanups. 2004-09-27 22:20:40 +00:00
8efe926bfe More Win32 cleanups for Dave Page. 2004-09-27 22:11:23 +00:00
866627f84d Make adjustment for MS VC and BCC compile of psql, from Dave Page. 2004-09-27 22:06:41 +00:00
f6b896b17a Improve MS VC builds for psql by handlling flex properly and prevent
rename prototype conflict.
2004-09-27 20:37:20 +00:00
a6cb7fd60a Translation update 2004-09-27 20:28:15 +00:00
353b70aef3 Translation updates 2004-09-27 20:26:03 +00:00
9216b152e3 Translation update 2004-09-27 20:23:07 +00:00
ad6a6170e5 New translations 2004-09-27 20:21:24 +00:00
32b24bfa97 Remove inclusion of windows.h now that it is included in c.h, per idea
from Peter.
2004-09-27 19:16:03 +00:00