Commit Graph

11654 Commits

Author SHA1 Message Date
Michael Meskes 4b02f3c4eb Synced parser and fixed a bug in error output to log file. 2003-08-25 13:44:00 +00:00
Bruce Momjian f3dda96452 Fix unixware thread test. 2003-08-25 02:48:25 +00:00
Tatsuo Ishii 0c9f978c0c Fix GB18030 to UTF-8 mapping table 2003-08-25 01:46:16 +00:00
Bruce Momjian eb4dded09e Add quotes to += of unixware threads define. 2003-08-24 23:21:05 +00:00
Barry Lind 2495365df1 Applied patches from Oliver Jowett to fix the following bugs:
- adds a finalizer method to AbstractJdbc1Statement to clean up in the case of
   poor user code which fails to close the statement object
 - fix ant build file to correctly detect dependencies across jdbc1/jdbc2/jdbc3
 - fix a coupld of server prepared statement bugs and added regression test for
   them
Applied patch from Kim Ho:
 - adds support for get/setMaxFieldSize().
Also fixed build.xml to provide a better error message in the event that an
older version of the driver exists in the classpath when trying to build.
2003-08-24 22:10:09 +00:00
Peter Eisentraut 478bb0268f Fix translation mistake. 2003-08-24 21:26:34 +00:00
Peter Eisentraut 903fe8fc6f Translation updates 2003-08-24 21:18:53 +00:00
Peter Eisentraut 693aad413b Change warnings for non-existing or pre-existing cursors to errors. 2003-08-24 21:02:43 +00:00
Peter Eisentraut c3664c0c00 Add macros for error result fields to libpq. 2003-08-24 18:36:38 +00:00
Tatsuo Ishii b4ab39ff05 Fix GB18030 to UTF-8 mapping table 2003-08-24 05:18:04 +00:00
Peter Eisentraut 200b7d11af Fix uninstall target. 2003-08-23 04:22:34 +00:00
Peter Eisentraut 588970c399 Correct uninstall target. 2003-08-23 04:21:59 +00:00
Tom Lane 29a43f398a Tweak grammar to use FastAppend rather than lappend when constructing
expr_lists.  This appears to be the only remaining O(N^2) bottleneck
in processing many-way 'x IN (a,b,c,...)' conditions.
2003-08-22 20:34:33 +00:00
Tom Lane 92ee2528d8 Tweak processing of multiple-index-scan plans to reduce overhead when
handling many-way scans: instead of re-evaluating all prior indexscan
quals to see if a tuple has been fetched more than once, use a hash table
indexed by tuple CTID.  But fall back to the old way if the hash table
grows to exceed SortMem.
2003-08-22 20:26:43 +00:00
Peter Eisentraut ef38ca9b3d Translation updates 2003-08-20 21:10:01 +00:00
Tom Lane 80860c32d9 Improve dynahash.c's API so that caller can specify the comparison function
as well as the hash function (formerly the comparison function was hardwired
as memcmp()).  This makes it possible to eliminate the special-purpose
hashtable management code in execGrouping.c in favor of using dynahash to
manage tuple hashtables; which is a win because dynahash knows how to expand
a hashtable when the original size estimate was too small, whereas the
special-purpose code was too stupid to do that.  (See recent gripe from
Stephan Szabo about poor performance when hash table size estimate is way
off.)  Free side benefit: when using string_hash, the default comparison
function is now strncmp() instead of memcmp().  This should eliminate some
part of the overhead associated with larger NAMEDATALEN values.
2003-08-19 01:13:41 +00:00
Tom Lane 23e10843db When compiling a plpgsql trigger function, include the OID of the table
the trigger is attached to in the hashkey.  This ensures that we will
create separate compiled trees for each table the trigger is used with,
avoiding possible datatype-mismatch problems if the tables have different
rowtypes.  This is essentially the same bug recently identified in plpython
--- though plpgsql doesn't seem as prone to crash when the rowtype changes
underneath it.  But failing robustly is no substitute for just working.
2003-08-18 19:16:02 +00:00
Tom Lane e945246321 Fix ARRAY[] construct so that in multidimensional case, elements can
be anything yielding an array of the proper kind, not only sub-ARRAY[]
constructs; do subscript checking at runtime not parse time.  Also,
adjust array_cat to make array || array comply with the SQL99 spec.

Joe Conway
2003-08-17 23:43:27 +00:00
Tom Lane de9c553f6b Clean up locktable init code per recent gripe from Kurt Roeckx.
No change in behavior, but old code would have failed to detect
overrun of MAX_LOCKMODES.
2003-08-17 22:41:12 +00:00
Tom Lane c771838106 Somebody forgot to include any actual documentation for ADD_MISSING_FROM. 2003-08-17 22:19:15 +00:00
Tom Lane ec646dbc65 Create a 'type cache' that keeps track of the data needed for any particular
datatype by array_eq and array_cmp; use this to solve problems with memory
leaks in array indexing support.  The parser's equality_oper and ordering_oper
routines also use the cache.  Change the operator search algorithms to look
for appropriate btree or hash index opclasses, instead of assuming operators
named '<' or '=' have the right semantics.  (ORDER BY ASC/DESC now also look
at opclasses, instead of assuming '<' and '>' are the right things.)  Add
several more index opclasses so that there is no regression in functionality
for base datatypes.  initdb forced due to catalog additions.
2003-08-17 19:58:06 +00:00
Bruce Momjian d4be99f63d (I always forget what the magic numbers 0 through 2 means for the
"syslog" option.)

By the way: The "virtual_host" parameter is a bad name for that
particular option, I think. "Virtual host" signals that PostgreSQL will
behave differently according to which IP address it's contacted (like
Apache's virtual host support which makes the web-server serve different
sites according to different criteria). A better word for the options
would be "tcpip_listen_addr" or something like that.

Troels Arvin
2003-08-17 03:17:22 +00:00
Bruce Momjian 4369432405 Not needed, already in CVS. 2003-08-17 00:14:13 +00:00
Bruce Momjian bfeabcc84f Add description of error style. 2003-08-16 23:53:54 +00:00
Bruce Momjian edc999b09a Make NEED_REENTRANT_FUNC_NAMES _require_ *_r functions, and add tests to
configure to report if they are not found.
2003-08-16 15:35:51 +00:00
Barry Lind dcfa89537a Updated the blob regression test to actually use the getBlob/getClob methods
and test them, in addition to testing the underlying LargeObject API methods.

 Modified Files:
 	jdbc/build.xml jdbc/org/postgresql/test/jdbc2/BlobTest.java
2003-08-15 18:45:11 +00:00
Barry Lind 5cad6813fb Fixed improper message length for the connection termination message 'X' when
using the V3 protocol.

 Modified Files:
 	jdbc1/AbstractJdbc1Connection.java
2003-08-15 18:36:58 +00:00
Tom Lane 432ca9116b Rewrite array_cmp to not depend on deconstruct_array. Should be a little
faster, but more importantly does not leak memory.  Still needs more work
though, per my recent note to pgsql-hackers.
2003-08-15 00:22:26 +00:00
Bruce Momjian b72c1b9f63 Adjustment for unixware threading. 2003-08-14 21:24:38 +00:00
Bruce Momjian bb0b73cd73 Mark unixware as having threaded support. 2003-08-14 21:14:17 +00:00
Tom Lane 4529d2cf27 Add missing quotes. 2003-08-14 18:56:41 +00:00
Tom Lane 80cedf9ba0 Someone moved PageOutput here from common.c, but forgot to move all
the #includes it depends on.
2003-08-14 18:49:42 +00:00
Tom Lane dbb4dd29e9 Remove unnecessary #include's (see c.h). 2003-08-14 18:48:35 +00:00
Tom Lane 71b0fe5b2e Workaround for platforms that have getaddrinfo() without AI_NUMERICHOST.
We don't actually need the flag, so just #define it as zero in such cases.
2003-08-14 18:32:55 +00:00
Tom Lane 2b5f049f7c Handle double-quotes correctly in user names in ACL lists.
Christopher Kings-Lynne
2003-08-14 14:19:11 +00:00
Bruce Momjian 8e97f45f88 Document threading status.
Update to POSIX getpwuid_r() function.
2003-08-14 05:27:18 +00:00
Bruce Momjian a4a31d3967 Adjust for compiler options for compiler bug.
Larry Rosenman
2003-08-13 23:59:49 +00:00
Tom Lane c01641f8ae libpq failed to cope with COPY FROM STDIN if the command was issued
via extended query protocol, because it sends Sync right after Execute
without realizing that the command to be executed is COPY.  There seems
to be no reasonable way for it to realize that, either, so the best fix
seems to be to make the backend ignore Sync during copy-in mode.  Bit of
a wart on the protocol, but little alternative.  Also, libpq must send
another Sync after terminating the COPY, if the command was issued via
Execute.
2003-08-13 18:56:21 +00:00
Tom Lane 0be731ad44 Add PQexecPrepared() and PQsendQueryPrepared() functions, to allow
libpq users to perform Bind/Execute of previously prepared statements.
Per yesterday's discussion, this offers enough performance improvement
to justify bending the 'no new features during beta' rule.
2003-08-13 16:29:03 +00:00
Tom Lane 5be44fa453 Move MemoryContextCheck() call from bottom of PostgresMain loop to
just before CommitTransactionCommand().  This is a more sensible place
to put it since commit discards a lot of contexts, and we'd not find
out about stomps affecting only transaction-local contexts.
2003-08-13 16:16:23 +00:00
Bruce Momjian c090b053fe I'm quite fond of doing VPATH builds, i.e. building outside the source
tree. This also catches lots of little Makefile bugs, so here's a small
patch for one of them (replacing an explicit reference to thread.c with
a reference to it as the first prerequsite of the rule makes make look
for it in the place where it was found (the source tree) rather than in
the build tree. (using GNU make 3.79.1)

John Gray
2003-08-13 03:12:04 +00:00
Tom Lane 9234591071 Include 'IPv4', 'IPv6', or 'Unix' in socket-creation failure messages,
in hopes of soothing fears of those with partial IPv6 support.  Still an
open question whether we should report EAFNOSUPPORT errors at all,
though.
2003-08-12 22:42:01 +00:00
Tom Lane 90ade5b775 Cope with NoData message from backend. Needed for case where
PQexecParams is used with a statement that doesn't return data.
2003-08-12 21:34:44 +00:00
Tom Lane b6e5823eda Marginal hacks to move some processing out of the per-client-message
processing loop; avoids extra overhead when using parse/bind/execute
messages instead of single Query message.
2003-08-12 18:52:38 +00:00
Tom Lane fcb90fdc95 Change some frequently-reached elog(DEBUG...) calls to ereport(DEBUG...)
for speed reasons.  (ereport falls out much more quickly when no output
is needed than elog does.)
2003-08-12 18:23:21 +00:00
Tom Lane 1c6702f6fc Avoid unnecessary work when stats collection is disabled. Tighten
search loop in pgstat_initstats.  Per report from Gavin Sherry.
2003-08-12 16:21:18 +00:00
Barry Lind e3d97d7da2 Applied patch from Oliver Jowett to clean up the jdbc regression test build
Modified Files:
 	jdbc/build.xml
 	jdbc/org/postgresql/test/jdbc3/Jdbc3TestSuite.java
2003-08-11 23:42:04 +00:00
Tom Lane 302f1a86dc Rewriter and planner should use only resno, not resname, to identify
target columns in INSERT and UPDATE targetlists.  Don't rely on resname
to be accurate in ruleutils, either.  This fixes bug reported by
Donald Fraser, in which renaming a column referenced in a rule did not
work very well.
2003-08-11 23:04:50 +00:00
Barry Lind c9fa2871f6 Applied patch from Oliver Jowett to better handle invalid input for getArray
(no longer throw an index out of range exception)

 Modified Files:
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
2003-08-11 21:33:50 +00:00
Barry Lind 1f96440d66 Applied patch from Oliver Jowett to clean up some aditional warning messages
from ant.

 Modified Files:
 	jdbc/build.xml
2003-08-11 21:27:52 +00:00