Commit Graph

9303 Commits

Author SHA1 Message Date
Peter Eisentraut
0055a39390 Add -Wno-error to CFLAGS, so the rest of the tree can compile with
-Werror.
2002-02-23 04:16:04 +00:00
Peter Eisentraut
51f195580f Save source of GUC settings, allowing different sources to be processed in
any order without affecting results.
2002-02-23 01:31:37 +00:00
Bruce Momjian
ab786f6299 Make factorial(0) return 1, as per spec. 2002-02-23 01:01:30 +00:00
Bruce Momjian
73732ef914 We had a problem with to compile pgsql-7.2 under SW-8.0.
In the mailing lists I found no informations.
See note for further informations.

Add missing AuthBlockSig.

regards Heiko
2002-02-22 15:39:42 +00:00
Dave Cramer
391e1f7b7f fixed compile error 2002-02-22 03:22:31 +00:00
Dave Cramer
8c17e4e0fc This patch fixes the exception thrown to inform the user the method
getColumnClassName(int) is not implemented. This will futher fixes method
ResultSet.getObject(int) since it requires the getColumnClassName(int) method to return the proper java class used to map the database column.

auther Ed Yu
2002-02-22 02:58:24 +00:00
Dave Cramer
deaad93462 Patch from Cormac Twomey
fixes getIndexInfo throwing NullPointerException
fixes getIndexInfo improper results when multiple key indexs are used
2002-02-22 02:40:09 +00:00
Dave Cramer
0786c61c14 Patch from Cormac Twomey
fixes getIndexInfo throwing NullPointerException
fixes getIndexInfo improper results when multiple key indexs are used
2002-02-22 02:17:13 +00:00
Dave Cramer
178961ad47 now compiles clean with jdk 1.4 2002-02-22 02:07:30 +00:00
Tom Lane
a40c17e17d Fix comment. 2002-02-20 22:47:12 +00:00
Tom Lane
d9b01c13a6 Avoid failures in cash_out and cash_words for INT_MIN.
Also, 'fourty' -> 'forty'.
2002-02-19 22:19:34 +00:00
Tom Lane
2220a2b5d7 Add casts to suppress gcc warnings on Solaris (where apparently pid_t
is different from int).
2002-02-19 20:45:04 +00:00
Tom Lane
7863404417 A bunch of changes aimed at reducing backend startup time...
Improve 'pg_internal.init' relcache entry preload mechanism so that it is
safe to use for all system catalogs, and arrange to preload a realistic
set of system-catalog entries instead of only the three nailed-in-cache
indexes that were formerly loaded this way.  Fix mechanism for deleting
out-of-date pg_internal.init files: this must be synchronized with transaction
commit, not just done at random times within transactions.  Drive it off
relcache invalidation mechanism so that no special-case tests are needed.

Cache additional information in relcache entries for indexes (their pg_index
tuples and index-operator OIDs) to eliminate repeated lookups.  Also cache
index opclass info at the per-opclass level to avoid repeated lookups during
relcache load.

Generalize 'systable scan' utilities originally developed by Hiroshi,
move them into genam.c, use in a number of places where there was formerly
ugly code for choosing either heap or index scan.  In particular this allows
simplification of the logic that prevents infinite recursion between syscache
and relcache during startup: we can easily switch to heapscans in relcache.c
when and where needed to avoid recursion, so IndexScanOK becomes simpler and
does not need any expensive initialization.

Eliminate useless opening of a heapscan data structure while doing an indexscan
(this saves an mdnblocks call and thus at least one kernel call).
2002-02-19 20:11:20 +00:00
Tom Lane
8e2998d8a6 Remove some unnecessary pqsignal() calls to shave a few cycles off
backend startup.
2002-02-19 19:54:43 +00:00
Tom Lane
6e546c286c Arrange to call localtime() during postmaster startup. On most Unixen,
the first call of localtime() in a process will read /usr/lib/tztab or
local equivalent.  Better to do this once in the postmaster and inherit
the data by fork() than to have to do it during every backend start.
2002-02-19 19:53:35 +00:00
Tom Lane
9103372f52 Avoid calling pq_flush just after sending AUTH_REQ_OK; this saves one
send() and probable process context swap during backend startup.
2002-02-19 19:49:09 +00:00
Peter Eisentraut
8adf56f77a Privileges on functions and procedural languages 2002-02-18 23:11:58 +00:00
Tom Lane
e4dd067398 Replace number-of-distinct-values estimator equation, per recent
pghackers discussion.
2002-02-18 16:04:14 +00:00
Bruce Momjian
b4a5fa4518 Remove MAX/MIN() macros, use c.h Max/Min() instead. 2002-02-18 14:25:40 +00:00
Bruce Momjian
d622cf867b Disable LIMIT #,# syntax, as agreed to months ago. Print message saying
to use separate LIMIT/OFFSET clauses.
2002-02-18 06:49:20 +00:00
Bruce Momjian
890a012d0a Reorder postgresql.conf WAL section to be clearer. 2002-02-18 06:42:54 +00:00
Bruce Momjian
5651a1665f Don't mention TIOGA in Makefile and move strdup.c rule into proper
'ifdef' in Makefile.
2002-02-18 06:03:23 +00:00
Bruce Momjian
fb8e3f15c0 Add code to preserve paren level display after \g, as submitted months ago. 2002-02-18 05:57:41 +00:00
Hiroshi Inoue
c03e7fbadc Remove compile warnings in multibute mode. 2002-02-18 05:54:50 +00:00
Bruce Momjian
fbcc0d69e8 Fix param handling of create* admin scripts as described months ago.
Properly handles default values.
2002-02-18 05:48:45 +00:00
Bruce Momjian
c448847378 Add better error text:
elog(LOG, "XLogWrite: new log file created - "
                     "consider increasing 'wal_files' in postgresql.conf.");
2002-02-18 05:44:45 +00:00
Bruce Momjian
b0bf66dfbe Add HTML output option to pgcvslog. 2002-02-18 05:33:13 +00:00
Tatsuo Ishii
ab604e8ac3 Fix kanji-coversion key binding. This has been broken since 7.1
Per Yoshinori Ariie's report.
2002-02-18 04:01:27 +00:00
Hiroshi Inoue
3c16d095b5 The version is now 7.01.0010.
1) Handle parameter array.
2) Allow re-use of the connection handle after SQLDisconnect.
3) Reject NULL if no indicator specified.
4) Improve the handling of '_' in table name.
5) Unify internal begin/commit/abort operations.
6) Change SQLTables() to return null not "" for the
   table_owner.
7) Fix a bug about parameter handling reported by Benoit Menendez.
8) Add cast in handling ODBC date/time escape sequences.
9) Fix a bug about cache_size handing in declare/fetch mode.

[ODBC3.0 related]
10) Improve the handling of descriptor handles(ODBC3.0).
11) Improve the type handling of some types for ODBC3.0.

[Thanks to Marcelo Aceto for his useful patches]
12) Allow nested ODBC escape.
13) Allow changing autocommit on/off inside the transaction
    block.
14) Improve the handling of ODBC scalar functions.
2002-02-18 03:16:11 +00:00
Hiroshi Inoue
b6db89a02d Separate info30.c from info.c. 2002-02-18 02:15:04 +00:00
Hiroshi Inoue
22d7fa7de4 Add files for ODBC3.0 support. 2002-02-18 01:43:24 +00:00
Bruce Momjian
4f5991552c Remove ODBC todo, add to main TODO. 2002-02-18 01:15:46 +00:00
Peter Eisentraut
673b48becb Remove warning about automatic inclusion of sqlca. 2002-02-15 17:46:57 +00:00
Tom Lane
3576820e78 Ensure that a cursor is scanned under the same scanCommandId it was
originally created with, so that the set of visible tuples does not
change as a result of other activity.  This essentially makes PG cursors
INSENSITIVE per the SQL92 definition.  See bug report of 13-Feb-02.
2002-02-14 15:24:10 +00:00
Tom Lane
fa046b6a92 Use RTLD_NOW, not RTLD_LAZY, as binding mode for dlopen() on all platforms.
This restores the Linux behavior to what it was in PG 7.0 and 7.1, and
causes other platforms to agree.  (Other well-tested platforms like HPUX
were doing it this way already.)  Per pghackers discussion over the past
month or so.
2002-02-12 23:41:25 +00:00
Tom Lane
9832a235c5 Modify COPY TO to emit carriage returns and newlines as backslash escapes
(backslash-r, backslash-n) for protection against newline-conversion
munging.  In future we will also tweak COPY FROM, but this part of the
change should be backwards-compatible.  Per pghackers discussion.
Also, update COPY reference page to describe the backslash conversions
more completely and accurately.
2002-02-12 21:25:41 +00:00
Tom Lane
028e13bc08 Tweak GiST code to work correctly on machines where 8-byte alignment
of pointers is required.  Patch from Teodor Sigaev per pghackers
discussion.  It's an ugly kluge but avoids forcing initdb; we'll put
a better fix into 7.3 or later.
2002-02-11 22:41:59 +00:00
Peter Eisentraut
2bd15ad0bc Fix for old FreeBSD versions that don't have RTLD_GLOBAL 2002-02-11 21:38:11 +00:00
Tom Lane
6799a6ca21 Repair problems with EvalPlanQual where target table is scanned as
inner indexscan (ie, one with runtime keys).  ExecIndexReScan must
compute or recompute runtime keys even if we are rescanning in the
EPQ case.  TidScan seems to have comparable problems.  Per bug
noted by Barry Lind 11-Feb-02.
2002-02-11 20:10:50 +00:00
Tom Lane
15c30b6f9a Be more wary about mixed-case database names and user names. Get
the CREATE DATABASE command right in pg_dump -C case.
2002-02-11 00:18:20 +00:00
Tom Lane
d99fb0d909 Don't Assert() that fsync() and close() never fail; I have seen this
crash on Solaris when over disk quota.  Instead, report such failures
via elog(DEBUG).
2002-02-10 22:56:31 +00:00
Bruce Momjian
dbb76bf2e0 Move sys/types.h to top, for hiroyuki hanai/ FreeBSD. 2002-02-08 16:30:11 +00:00
Tom Lane
0cc9917bb6 pgstat's truncation of query string needs to be multibyte-aware.
Patch from sugita@sra.co.jp.
2002-02-07 22:20:26 +00:00
Hiroshi Inoue
e206ff5946 Removed a check for REINDEX TABLE. 2002-02-07 00:27:30 +00:00
Tom Lane
6a67d9def0 Fix failure to reconnect as sequence's owner before issuing setval(). 2002-02-06 17:27:50 +00:00
Peter Eisentraut
3ac85b86cb Update Win32-world version number of libpq++. 2002-01-30 21:59:33 +00:00
Tom Lane
bef0c8dc29 Add cast to suppress gcc warning on Darwin platform. 2002-01-30 19:34:55 +00:00
Peter Eisentraut
b84bebfc09 update 2002-01-29 20:39:49 +00:00
Tom Lane
00fc295be0 Make S/390 TAS spell __inline__ the same way as the other eight GCC
inline routines do.
2002-01-29 15:44:42 +00:00
Peter Eisentraut
0d6813df4e Updates from Serguei Mokhov 2002-01-26 19:00:11 +00:00
Tom Lane
1b68bcfad3 Tweak pg_dump to say GRANT ALL when appropriate, rather than enumerating
the individual privilege bits.  I regard this as an important change for
cross-version compatibility: without this, a 7.1 dump loaded into 7.2
is likely to be short a few privileges.
2002-01-25 18:49:31 +00:00
Tom Lane
989b7d66d8 Tweak plperl.c to compile against threaded Perls, per report from
cturner@redhat.com.
2002-01-24 21:40:44 +00:00
Tom Lane
47ccf37c62 pltcl's spi_execp didn't handle NULL arguments quite correctly.
It would try to call the input conversion routines for them anyway.
So, a valid input string for the datatype had to be supplied.
2002-01-24 19:31:36 +00:00
Tom Lane
a45641d8a4 Fix incorrect test for whether Perl code is returning undef. This
allows plperl routines to return NULL as intended.
2002-01-24 16:53:42 +00:00
Tom Lane
386f1809a7 Fix logic error in insert_fsm_page_entry: because compact_fsm_page_list
removes any empty chunks, the chunk previously added won't be there
anymore, so it's possible there is zero free space in the rel's page list
afterwards.  Must loop back and rerun the part that adds a chunk to
the list.
2002-01-24 15:31:43 +00:00
Tom Lane
ab5b063618 Remove long-obsolete version of pltcl documentation. 2002-01-23 18:48:39 +00:00
Tom Lane
830cdb5f45 Clean up Red Hat Tcl RPM brain-damage in a more reliable way: fix the
value of TCL_SHLIB_LD in the shell script that creates Makefile.tcldefs,
rather than trying to persude gmake to do it.
2002-01-23 18:45:41 +00:00
Michael Meskes
cb8961ab47 Added patch to temporarily disable locale for descriptors too (Christof) 2002-01-23 16:34:06 +00:00
Tom Lane
04c8d4c660 libpq++/pgconnection.h must not include postgres_fe.h, else it fails to
compile in client apps that use the standard installed header set.
To allow removing that include, move DLLIMPORT definitions out of c.h
and into the appropriate port-specific header files.
2002-01-22 19:02:40 +00:00
Tom Lane
2f383b2de6 Suppress bogus soname switch that RedHat RPMs put into tclConfig.sh. 2002-01-21 03:27:46 +00:00
Bruce Momjian
1a712718ca Add IN/EXISTS file. 2002-01-20 05:12:57 +00:00
Peter Eisentraut
0363192c69 Update from Kova'cs Zolta'n 2002-01-18 21:25:00 +00:00
Bruce Momjian
69f909ba10 You might want to run pg_indent on pg_backup_db.c however ...
tom lane
2002-01-18 19:17:05 +00:00
Dave Cramer
83b5ae65a0 Fixes to getImportedKeys/getExportedKeys from Jason Davies
Previous versions did not correctly identify primary/foreign keys
2002-01-18 17:21:51 +00:00
Tom Lane
bb698c25c7 Fix pg_restore to handle the 'set max oid' entry correctly in archives
dumped by pg_dump -o.  Per bug report posted by Bruce; fix is from
Philip Warner, reviewed by Tom Lane.
2002-01-18 17:13:51 +00:00
Tom Lane
3dfe80243c Add missing 'else', per report from sugita@sra.co.jp. 2002-01-18 16:14:54 +00:00
Michael Meskes
2ab3a88879 Accept subsequent commits. This should have been just a warning anyway. I
cannot see a reason why it should be an error.
2002-01-18 15:51:00 +00:00
Tom Lane
b7bf03c9ed Fix misstatements added by Bruce. 2002-01-16 23:51:56 +00:00
Bruce Momjian
d781138235 Add more comments to tqual.c for visibility functions. 2002-01-16 23:09:09 +00:00
Tom Lane
cf97080fa4 TOAST needs to do at least minimal time-qual checking in order not to
mess up after an aborted VACUUM FULL, per today's pghackers discussion.
Add a suitable HeapTupleSatisfiesToast routine.  Remove useless special-
case test in HeapTupleSatisfiesVisibility macro for xmax =
BootstrapTransactionId; perhaps that was needed at one time, but it's
a waste of cycles now, not to mention actively wrong for SnapshotAny.
Along the way, add some much-needed comments to tqual.c, and simplify
toast_fetch_datum, which no longer needs to assume it may see chunks
out-of-order.
2002-01-16 20:29:02 +00:00
Tom Lane
0f2d949c1e Fix init_irels to close the pg_internal.init file before returning.
This saves one open file descriptor per backend, and avoids an
annoying NOTICE on Cygwin (which has trouble deleting open files).
Bug appears to date back to original coding of init_irels, circa 1992.
2002-01-16 17:34:42 +00:00
Tom Lane
d66b10833f If we fail to rename pg_internal.init into place, delete the useless
temporary file.  This seems to be a known failure mode under Cygwin,
so we might as well expend the extra line of code to be tidy.
2002-01-15 22:33:20 +00:00
Tom Lane
aa00e6134e Add more sanity-checking to PageAddItem and PageIndexTupleDelete,
to prevent spreading of corruption when page header pointers are bad.
Merge PageZero into PageInit, since it was never used separately, and
remove separate memset calls used at most other PageInit call points.
Remove IndexPageCleanup, which wasn't used at all.
2002-01-15 22:14:17 +00:00
Tom Lane
685a66cdfe Fix typo that caused equalTriggerDescs() to return false in cases where
the two trigger sets were logically equal, but not in the same order.
Caught by Holger Krug (hkrug@rationalizer.com).
2002-01-15 16:52:47 +00:00
Barry Lind
2843a13e51 Applied patch submitted by Ryouichi Matsuda (r-matuda@sra.co.jp) that fixed a problem with leading zeros being lost on fractional seconds when setting a timestamp value on a PreparedStatement. 2002-01-15 07:37:33 +00:00
Barry Lind
d013dbed75 Applied patch from Ryouichi Matsuda <r-matuda@sra.co.jp> where the jdbc
driver was not properly handling timestamptz datatype when using the
getObject() method on ResultSet.  Fix adds this datatype to the object mappings.
2002-01-15 06:55:13 +00:00
Tom Lane
7e1d82040e pg_upgrade doesn't live here anymore. Remove dangling references. 2002-01-15 05:05:49 +00:00
Bruce Momjian
50c9557500 Remove old pg_upgrade script, from Tom. 2002-01-15 04:52:33 +00:00
Tom Lane
2004337785 Reduce severity of 'XLogFlush: request is not satisfied' error condition,
per my proposal of a couple days ago.  This will eliminate the unable-
to-restart-database class of problem that we have seen reported half a
dozen times with 7.1.*.
2002-01-14 17:55:57 +00:00
Tom Lane
eab6776358 Ensure that ecpg/test is cleaned by higher-level 'make clean'. 2002-01-14 17:49:56 +00:00
Bruce Momjian
d43b364eb9 Small AIX fixes from Rick Flower. 2002-01-14 15:34:41 +00:00
Bruce Momjian
1b5d8e6d5c Fix recreation of sequence files for 7.2 also because of XID change from
beta4 to beta5.
2002-01-13 17:52:00 +00:00
Michael Meskes
7138a1e5fc - Fixed variable handling for struct members.
- Removed check for array input. An attribut might store the
          complete array.
2002-01-13 08:52:09 +00:00
Bruce Momjian
4b20cc1032 Now works for 7.1 databases. 2002-01-13 05:36:42 +00:00
Bruce Momjian
11b3e56223 Now tested on 7.2->7.2 migration; still disabled. Need 7.1 testing now. 2002-01-13 04:55:44 +00:00
Bruce Momjian
9be030fbeb Keep it disabled. 2002-01-13 01:22:27 +00:00
Bruce Momjian
5b2ebe95e9 Wow, it actually worked for the regression database. More testing needed. 2002-01-13 01:13:59 +00:00
Tom Lane
f5bbcfb0b2 Bump catversion to ensure people apply recent timestamp and sequence
fixes.
2002-01-12 18:09:04 +00:00
Tom Lane
47503f954c Update horology expected results (this variant extrapolated by yours
truly; should be verified by someone with an appropriate system).
2002-01-12 18:07:34 +00:00
Tom Lane
f171bd5219 Update horology expected results (this variant verified on HPUX). 2002-01-12 18:06:53 +00:00
Thomas G. Lockhart
192061e45b Repair bugs in declarations of routines to add timestamptz and interval.
Thanks to Bruce for spotting it and Tom Lane for diagnosing it.
Since horology test output is changing anyway, add some date/time input
 tests to horology.sql. Some of these should move to the tests for the
 individual data types, and we perhaps should add an entire new test
 for "timezone" to allow manipulating the current time zone without
 risking damage to the results of other tests.
2002-01-12 04:38:38 +00:00
Tom Lane
0e1a5075fd Fix pg_dump to read-lock all tables to be dumped as soon as it's read
their names from pg_class.  This considerably reduces the window wherein
someone could DROP or ALTER a table that pg_dump is intending to dump.
Not a perfect solution, but definitely an improvement.  Per complaints
from Marc Fournier; patch by Brent Verner with some kibitzing by Tom Lane.
2002-01-11 23:21:55 +00:00
Bruce Momjian
3bb77555b1 Sync up. 2002-01-11 20:34:14 +00:00
Tom Lane
5ab0ad5c7e VACUUM must make sure that a HEAP_MARKED_FOR_UPDATE tuple gets marked
as either HEAP_XMAX_COMMITTED or HEAP_XMAX_INVALID once the updating
transaction is gone.  Otherwise some other transaction may come along
and try to test the commit status of t_xmax later --- which could be
after VACUUM has recycled the CLOG status for that xact.  Bug introduced
in post-beta4 bug fix.
2002-01-11 20:07:03 +00:00
Tom Lane
eb5e8bae26 Fix sequence creation to set the t_xmin of a sequence's tuple to
FrozenTransactionId, not the XID of the creating transaction.  Without
this it's possible for a reference to a long-gone CLOG record to occur,
per Christian Meunier's bug report of 10-Jan-02.  Worse, the sequence
tuple would become invisible to SELECTs after 2 billion transactions.

Since the fix is applied during sequence creation it does not help
existing databases, unless you drop and recreate every sequence.
However, we intend to force initdb for 7.2RC1 anyway, to fix a pg_proc
error, so I see no need to do more for this problem.
2002-01-11 18:16:04 +00:00
Michael Meskes
051a4f233f Added Christof's fixes. 2002-01-11 14:43:11 +00:00
Bruce Momjian
4e37786f2f More testing, more cleanups. 2002-01-11 06:48:41 +00:00
Bruce Momjian
37c9346ef2 pg_resetxlog specifies log location in hex; more pg_upgrade testing
improvments.
2002-01-11 06:33:01 +00:00
Bruce Momjian
ba3231a2a0 More cleanups. 2002-01-11 06:08:02 +00:00
Hiroshi Inoue
d91b445117 *** empty log message *** 2002-01-11 06:01:47 +00:00
Bruce Momjian
3b3b730728 More updates for int8 sequence restoration. Old dump file not required
anymore.
2002-01-11 05:54:59 +00:00
Bruce Momjian
6bd45e5264 Handle int4-int8 sequence migration without full data dump. 2002-01-11 04:39:19 +00:00
Hiroshi Inoue
f43b5de649 Add a directory to save the changes until 7.3-tree is branched. 2002-01-11 02:50:01 +00:00
Bruce Momjian
5370cd6b03 More improvements using pg_resetxlog. still disabled. 2002-01-11 00:27:42 +00:00
Michael Meskes
7955f98774 Include sqlca.h automatically. 2002-01-10 10:42:54 +00:00
Bruce Momjian
7a0672b7b1 More pg_upgrade improvements. Almost done, except for max transaction
setting.
2002-01-10 04:58:19 +00:00
Bruce Momjian
4d151d0b12 More improvements; still disabled. (Don't panic.) 2002-01-10 03:05:48 +00:00
Tom Lane
92a2598f97 The result of getopt() should be compared to -1, not EOF, per
pgsql-hackers discussion of this date.
2002-01-10 01:11:45 +00:00
Bruce Momjian
5461983d08 Update with new features. Still disabled. 2002-01-09 21:50:52 +00:00
Tom Lane
9facc585ad Fix use of 'char' to hold result of getc, per bug report forwarded by
Oliver Elphick.  A few other minor cleanups while at it.
2002-01-09 19:13:41 +00:00
Tom Lane
8ff263f362 Fix portability problem (result of getopt is int, not char). 2002-01-09 18:21:46 +00:00
Bruce Momjian
bf6992b499 Remove clog copy. 2002-01-09 16:08:54 +00:00
Bruce Momjian
7dc2dc2677 Make improvements to pg_upgrade; is still disabled. 2002-01-09 16:00:46 +00:00
Bruce Momjian
5ac10980d7 Add quotes around $bindir. 2002-01-09 04:56:44 +00:00
Tom Lane
d079c419d2 Fix include paths for case of VPATH build. 2002-01-09 00:06:42 +00:00
Tom Lane
5490c72a64 make install failed in VPATH build. 2002-01-08 23:40:02 +00:00
Tom Lane
a34f313223 Fix copy-and-paste mistake exposed by gcc warning. 2002-01-08 23:34:47 +00:00
Tom Lane
bf2e5eedf0 In a VPATH build, resultmap must be one of the symlinked files, else
pg_regress doesn't see it and you don't get any port-specific
comparisons.
2002-01-08 21:00:30 +00:00
Peter Eisentraut
154ccb6040 Revert last change (CFLAGS+=-g). Probably was a mistake... 2002-01-08 20:41:28 +00:00
Tom Lane
61dd8b6dc4 Remove shift/reduce conflicts introduced by last change. 2002-01-08 19:02:51 +00:00
Tom Lane
649d8543d3 Fix lpad() and rpad() to produce correct results in variable-length
multibyte encodings.
2002-01-08 17:03:41 +00:00
Michael Meskes
1e15f9e119 Fixed array pointers, no longer using void * in arithmetics. 2002-01-08 14:25:06 +00:00
Tom Lane
5b9a058384 Tweak LWLock algorithms so that an awakened waiter for a lock is not
granted the lock when awakened; the signal now only means that the lock
is potentially available.  The waiting process must retry its attempt
to get the lock when it gets to run.  This allows the lock releasing
process to re-acquire the lock later in its timeslice.  Since LWLocks
are usually held for short periods, it is possible for a process to
acquire and release the same lock many times in a timeslice.  The old
spinlock-based implementation of these locks allowed for that; but the
original coding of LWLock would force a process swap for each acquisition
if there was any contention.  Although this approach reopens the door to
process starvation (a waiter might repeatedly fail to get the lock),
the odds of that being a big problem seem low, and the performance cost
of the previous approach is considerable.
2002-01-07 16:33:00 +00:00
Michael Meskes
54452833ef Fixed parser to accept initializing expressions starting with "(". 2002-01-07 16:25:45 +00:00
Peter Eisentraut
731204e090 Editorial review 2002-01-07 02:29:15 +00:00
Tom Lane
a510bf4326 If we fail to fork a new backend process, (try to) report the failure
to the client before closing the connection.  Before 7.2 this was done
correctly, but new code would simply close the connection with no report
to the client.
2002-01-06 21:40:02 +00:00
Tom Lane
3b6cbce458 Add CHECK_FOR_INTERRUPTS() in various strategic spots, per comments
from Hiroshi.
2002-01-06 00:37:44 +00:00
Barry Lind
734e421278 Bugfix for bug reported by Marcus Better (marcus@dactylis.com). When preforming
a get on a bytea value the code was running the raw value from the server
through character set conversion, which if the character set was SQL_ASCII
would cause all 8bit characters to become ?'s.
2002-01-05 22:26:23 +00:00
Tom Lane
1aff1d30d6 Fix some incorrect and obsolete commentary. 2002-01-04 17:06:51 +00:00
Thomas G. Lockhart
c826d1cefb Have to_date() call timestamptz_date() per Karel's email instructions.
Fixes time zone problems introduced by Thomas' implementation of
 TIMESTAMP WITHOUT TIME ZONE which caused the behavior of the previously
 appropriate routine, timestamp_date(), to change for the worse in this
 context.
2002-01-04 15:49:42 +00:00
Bruce Momjian
5a60ba5078 Replace #ifdef, #endif with # requires comment. 2002-01-04 05:50:25 +00:00
Tom Lane
dc6b4deb97 Require ownership permission for CREATE INDEX, per bug report.
Disallow CREATE INDEX on system catalogs, non-tables (views, sequences, etc).
Disallow CREATE/DROP TRIGGER on system catalogs, non-tables.
Disallow ALTER TABLE ADD/DROP CONSTRAINT on system catalogs.
Disallow FOREIGN KEY reference to non-table.
None of these things can actually work in the present system structure,
but the code was letting them pass without complaint.
2002-01-03 23:21:32 +00:00
Tom Lane
d02f0aaa3b Instead of waiting a fixed amount of time for the test postmaster to
start up, wait until a psql connection attempt succeeds.  Per gripe
from Jason Tishler.
2002-01-03 21:52:05 +00:00
Tom Lane
ab20692e1e SPI_cursor_open must copy by-reference parameter values into the
portal's memory context, so that they will live as long as the portal does.
2002-01-03 20:30:47 +00:00
Tom Lane
f7fb29dec3 Shouldn't try to copy null datums with datumCopy. 2002-01-03 18:01:59 +00:00
Bruce Momjian
b9da4b726c Droplang didn't have test for -l, list. This was really broken too.
Took test from createlang.
2002-01-03 08:53:00 +00:00
Bruce Momjian
4ecd278991 Add mention that createlang.sh indirection not needed but kept for later. 2002-01-03 08:38:00 +00:00
Bruce Momjian
a4ee277e17 droplang had same problem as createlang; default are backwards and did
not work.  Fixed to match createlang.
2002-01-03 06:09:02 +00:00
Bruce Momjian
04f3342e03 In createlang, make dbname optional, not langname, or rather, make
existing code of dbname optional actually work.
2002-01-03 05:30:04 +00:00
Tom Lane
b36df04ce2 Guard against roundoff errors in new selectivity-estimation code,
per bug report from Laurette Cisneros.
2002-01-03 04:02:34 +00:00
Tom Lane
bb2bff498c Fix to_timestamp/to_date so that zero year input for Y, YY, or YYY
formats will be taken as 2000, not year zero.  Per bug report from
Aasmund Midttun Godal.  Fix from Karel Zak.
2002-01-02 22:09:23 +00:00
Tom Lane
4764ae823b Do not accept interrupts in RESUME_INTERRUPTS() and END_CRIT_SECTION()
macros, but only at explicit CHECK_FOR_INTERRUPTS() calls.  Not clear
whether overenthusiastic acceptance of interrupts accounts for any real
bugs, but it definitely seems risky and unnecessary.
2002-01-01 23:16:22 +00:00
Tom Lane
1ccc67600b Fix race condition that could allow two concurrent transactions
to insert the same key into a supposedly unique index.  The bug is of
low probability, and may not explain any of the recent reports of
duplicated rows; but a bug is a bug.
2002-01-01 20:32:37 +00:00
Thomas G. Lockhart
c546170e77 Rename TIME token to ISOTIME to eliminate conflict with gram.y parser
token. Seems to be isolated to datetime.c and datetime.h.
2002-01-01 02:54:33 +00:00
Tom Lane
ee051baeac Make sure that all <ctype.h> routines are called with unsigned char
values; it's not portable to call them with signed chars.  I recall doing
this for the last release, but a few more uncasted calls have snuck in.
2001-12-30 23:09:42 +00:00
Bruce Momjian
6f901b6f5a Oops, only wanted datetime.c changes in there. lock stuff reversed out. 2001-12-29 21:30:32 +00:00
Bruce Momjian
9e7b9c6f54 Fix newly introduced datetime.c compile failure; not enough parens. 2001-12-29 21:28:18 +00:00
Thomas G. Lockhart
b7a0af7d64 Check a bit more carefully for preceeding ISO field tags
when decoding date fields.
2001-12-29 18:40:58 +00:00
Thomas G. Lockhart
b5e23db438 Rework the date/time parsing to tighten up some cases and to enable other
cases which should have worked but did not.
Now supports julian day (J2452271), ISO time labels (T040506) and various
 combinations of spaces and run-togethers of dates, times, and time zones.
All regression tests pass, and I have more tests to add after the 7.2
 release (don't want to require changes to the ancillary horology result
 files until after then).
2001-12-29 18:31:48 +00:00
Tom Lane
198152730b Improve LOCK_DEBUG logging code for LWLocks. 2001-12-28 23:26:04 +00:00
Peter Eisentraut
9d6d4dfeeb Update from Serguei Mokhov 2001-12-28 18:47:54 +00:00
Tom Lane
d3fc362ec2 Ensure that all direct uses of spinlock-protected data structures use
'volatile' pointers to access those structures, so that optimizing
compilers will not decide to move the structure accesses outside of the
spinlock-acquire-to-spinlock-release sequence.  There are no known bugs
in these uses at present, but based on bad experience with lwlock.c,
it seems prudent to ensure that we protect these other uses too.
Per pghackers discussion around 12-Dec.  (Note: it should not be
necessary to worry about structures protected by LWLocks, since the
LWLock acquire and release operations are not inline macros.)
2001-12-28 18:16:43 +00:00
Bruce Momjian
52c780e04b Oops, back out paren fix. That is for 7.3. 2001-12-28 05:01:05 +00:00
Bruce Momjian
deab927470 Add mention of Christof Petig for ecpg items. 2001-12-28 05:00:32 +00:00
Peter Eisentraut
32c94a28c2 Update from Serguei Mokhov 2001-12-27 21:06:07 +00:00
Bruce Momjian
2fcc911750 Place PAM before REJECT in sample file. 2001-12-24 04:44:03 +00:00
Michael Meskes
988fdce5d1 - Removed space_or_nl and line_end from pgc.l.
- Fixed several bugs concerning arrays of structs including a memory
  allocation bug.
2001-12-23 12:17:41 +00:00
Tom Lane
aed0c29f7e Fix mispeling ... 2001-12-23 07:25:39 +00:00
Peter Eisentraut
cb85a62807 Czech translation updates from Karel Zak 2001-12-21 22:30:49 +00:00
Peter Eisentraut
d56c072c83 Fix error 2001-12-21 22:27:34 +00:00
Tom Lane
12d17deb4f Use MemSet() rather than a loop to do blank-padding on PS_USE_CLOBBER_ARGV
machines.  I have just been observing some scenarios where set_ps_display
accounts for more than 10% of the backend CPU, and this loop has to be
the reason.
2001-12-21 15:22:09 +00:00
Thomas G. Lockhart
db667614ef Add full name of the month of July to the lookup table.
Thanks to Greg Sabino Mullane <greg@turnstep.com> for finding the problem.
2001-12-21 06:03:27 +00:00
Thomas G. Lockhart
daefb89e5a Remove duplicate lines from fouled up last commit (my DSL line failed
during the CVS update, leaving locks and bad files).
2001-12-21 06:01:36 +00:00
Tom Lane
ba8d7ac8e9 Select proper geometry comparison file for freebsd/alpha.
Per report from Christopher Kings-Lynne.
2001-12-21 03:03:55 +00:00
Bruce Momjian
8799d84603 Add memcmp() test and new memcmp.c file, for SunOS. Tested by Tatsuo. 2001-12-20 21:23:05 +00:00
Tatsuo Ishii
960f6a5fdf Fix for SunOS4 horology test 2001-12-20 04:25:00 +00:00
Bruce Momjian
48aa2dbe61 MIN() -> Min, fixes compile problem. 2001-12-20 02:39:26 +00:00
Tom Lane
8647c14228 Fix buffer-overrun problem in pretty printer. 2001-12-19 22:35:35 +00:00
Tom Lane
9aa2e7da51 Temporarily dike out GetUndoRecPtr() in checkpoint generation, since we
do not use the undo pointer anyway.  This is a quick-hack solution for
the three-way deadlock condition discussed in pghackers 17-Dec-01.
Need to find a better way of doing it.
2001-12-19 19:42:51 +00:00
Tom Lane
14e1270579 Tweak to make freebsd/alpha use the correct float8 comparison file. 2001-12-19 17:25:55 +00:00
Tom Lane
de59370844 Make sure that all variants of HeapTupleSatisfies will do the right thing
if presented with a tuple in process of being moved by VACUUM.  Per
bug report from Brian Hirt.
2001-12-19 17:18:39 +00:00
Bruce Momjian
e71493300c Move geqo enable into proper section. 2001-12-17 19:09:01 +00:00
Bruce Momjian
f3292901b9 More comment for libpgeasy. 2001-12-14 02:15:04 +00:00
Bruce Momjian
2e05d3ecdb Fix double-memory free in libpgeasy; problem introduced yesterday. 2001-12-14 00:52:53 +00:00
Bruce Momjian
bdafb40077 Clean up comment in libpgeasy. 2001-12-14 00:40:31 +00:00
Peter Eisentraut
3aaaf5aeee Add Swedish 2001-12-13 22:06:33 +00:00
Peter Eisentraut
cfe88fdf4b update 2001-12-13 22:04:40 +00:00
Peter Eisentraut
d159952304 Update from Serguei Mokhov 2001-12-13 22:04:12 +00:00
Peter Eisentraut
2adce49615 Update Hungarian from Kovacs Zoltan 2001-12-13 22:02:20 +00:00
Peter Eisentraut
60e42602a0 revert last change 2001-12-13 18:39:04 +00:00
Bruce Momjian
ba578ae667 Free libpgeasy result structure on database close; fixed memory leak. 2001-12-13 09:40:18 +00:00
Tom Lane
990eb8552e Don't accept names of complex types (ie, relation types) as being
requests for implicit trivial coercions.  Prevents sillinesses like
this one:
regression=# select x.int8_tbl.q1 from int8_tbl x;
ERROR:  fmgr_info: function 270997776: cache lookup failed
2001-12-12 03:28:49 +00:00
Barry Lind
3dd85bcb08 Applied patch from Thomas O'Dowd that fixes timestamp parsing. The jdbc code
wasn't updated to handle more than two decimal digits for fractional seconds
that now are possible in 7.2.  This patch fixes the timestamp parsing logic.
I have built and tested on both jdbc1 and jdbc2.
2001-12-11 04:48:05 +00:00
Barry Lind
45a6343ebb Patch from Ned Wolpert that fixes a bug that caused the cache of types not
to be used, causing extra sql statements to be executed.  This was a
significant performance problem with the database meta data classes.
The fix is a simple one liner.
2001-12-11 04:44:23 +00:00
Tom Lane
4433eb1dff Make sure that inlined S_UNLOCK is marked as an update of a 'volatile'
object.  This should prevent the compiler from reordering loads and stores
into or out of a critical section.
2001-12-11 02:58:49 +00:00
Tom Lane
07009651ce Repair roundoff-error problem for stddev/variance results near zero,
per complaint from Kemin Zhou.
Fix lack of precision in numeric stddev/variance.
2001-12-11 02:02:12 +00:00
Tom Lane
63cc56de54 Suppress subquery pullup and pushdown when the subquery has any
set-returning functions in its target list.  This ensures that we
won't rewrite the query in a way that places set-returning functions
into quals (WHERE clauses).  Cf. bug reports from Joe Conway.
2001-12-10 22:54:12 +00:00
Tom Lane
584f818bef Declare LWLock pointers as volatile to prevent AIX compiler from
reordering operations at its whim.  Releasing TAS lock before we've
finished updating proc structure is uncool.
2001-12-10 21:13:50 +00:00
Peter Eisentraut
53016fa55c Update from Weiping He 2001-12-10 18:45:57 +00:00
Peter Eisentraut
356c02b262 Update from Serguei Mokhov 2001-12-10 18:44:44 +00:00
Tom Lane
4e65c89fc3 AIX 5 needs same resultmap tweaks as AIX 4. 2001-12-10 16:31:23 +00:00
Tom Lane
f3f8499bc0 Repair case-conversion error in to_date's handling of roman numerals.
From Manuel Sugawara, approved by Karel Zak.
2001-12-10 15:34:05 +00:00
Michael Meskes
0a7a8256b8 committed the missing files 2001-12-10 14:55:47 +00:00
Peter Eisentraut
3f1d142c59 Add French translation 2001-12-10 13:03:55 +00:00
Peter Eisentraut
e2024ec6f0 update 2001-12-10 13:03:12 +00:00
Thomas G. Lockhart
9ed2ac291b Remove duplicate lines from previous patch attempt. Trouble with my
DSL line at home broke things right in the middle of an update. :(
2001-12-10 00:11:06 +00:00
Thomas G. Lockhart
abbd64cddf Support ODBC-style CURRENT_TIME, CURRENT_USER, etc with trailing empty
parens. This is not SQL spec syntax, so later we will remove
 this extension from gram.y.
2001-12-10 00:01:14 +00:00
Michael Meskes
a4420c4970 Fixed several bugs concerning indicators and added error messages instead of segfaults. 2001-12-09 15:27:49 +00:00
Thomas G. Lockhart
eda51264c8 Allow variable (unrestricted) precision for TIME and TIMESTAMP types in parser. 2001-12-09 04:39:39 +00:00
Thomas G. Lockhart
cd8b354971 Honor the typmod field for time zone intervals. 2001-12-09 04:37:50 +00:00