Commit Graph

12543 Commits

Author SHA1 Message Date
Bruce Momjian 3ceda5eab3 I just noticed that \dp outputs "Table" to indicate relations (tables,
sequences and views).  This patch allows it to handle views and
sequences.

Euler Taveira de Oliveira
2004-03-22 03:38:24 +00:00
Bruce Momjian a7f0747320 Adds DLLIMPORT modifier to check_function_bodies
Claudio Natoli
2004-03-22 03:15:33 +00:00
Bruce Momjian 08c0aa7281 Add mention of "-D_POSIX_PTHREAD_SEMANTICS" enabling 5-arg getpwuid_r(). 2004-03-22 01:50:31 +00:00
Tom Lane 0de45c1c27 Add timestamp-versus-timestamptz cross-type comparison functions,
flesh out the index operator classes to include these.  In passing,
fix erroneous volatility marking of ACL functions.
2004-03-22 01:38:18 +00:00
Tom Lane f938c2b91b Revise syntax-error reporting behavior to give pleasant results for
errors in internally-generated queries, such as those submitted by
plpgsql functions.  Per recent discussions with Fabien Coelho.
2004-03-21 22:29:11 +00:00
Dennis Bjorklund bee3b2a0a0 Translation updates 2004-03-21 12:19:36 +00:00
Dennis Bjorklund 94fb33b115 Translation updates 2004-03-21 09:22:18 +00:00
Tom Lane 05649b88c7 Rewrite pg_dump's comment-dumping code to pull over all the comments
in one query, rather than making a separate query for each object that
could have a comment.  This costs relatively little space (a few tens of
K typically) and saves substantial time in databases with many objects.
I find it reduces the runtime of 'pg_dump -s regression' by about a
third.
2004-03-20 20:09:45 +00:00
Bruce Momjian c8aaa5ceec Remove suggestiong for using test for wal_sync_method. 2004-03-20 16:18:41 +00:00
Bruce Momjian aaf54d99f0 Handle draft version of getpwuid_r() that accepts only four arguments.
Backpatch to 7.4.X.  Required for Solaris 7 & 8.
2004-03-20 15:39:27 +00:00
Tom Lane 0fdc6c4cc0 Create a validator for plpgsql, so that some minimal syntax checking
is done at creation time for plpgsql functions.  Improve createlang and
droplang to support adding/dropping validators for PLs.  Initial steps
towards producing a syntax error position from plpgsql syntax errors
(this part is a work in progress, and will change depending on outcome
of current discussions).
2004-03-19 18:58:07 +00:00
Tom Lane 74ffc77279 Code review for log_line_prefix patch. Cooperate with StringInfo instead
of fighting it, avoid hard-wired (and wrong) assumption about max length
of prefix, cause %l to actually work as documented, don't compute data
we may not need.
2004-03-19 02:23:59 +00:00
Bruce Momjian 8726591720 Make test_fsync use optimizer flag. 2004-03-18 23:27:29 +00:00
Bruce Momjian cbaf1aaeba Fix log_executor_stats if() test. 2004-03-18 23:26:17 +00:00
Bruce Momjian 2ef0ff89af Add Unixware thread support from Larry Rosenman. 2004-03-18 23:23:58 +00:00
Bruce Momjian 6b34711824 Allocate 16mb file for testing. 2004-03-18 20:09:33 +00:00
Bruce Momjian 9e231bab65 Have program default to 1000 loops, and add file name and loop option.
Make open/close loop testings the same.  Add descriptions for certain tests.
2004-03-18 19:54:00 +00:00
Bruce Momjian 9ae9ad155d Add comment about using this testing for wal_sync_method. 2004-03-18 17:23:56 +00:00
Bruce Momjian b2906c5be3 Add fsync tests:
Compare fsync before and after write's close:
	Compare one o_sync write to two:
	Compare file sync methods with one 8k write:
	Compare file sync methods with 2 8k writes:
2004-03-18 15:26:27 +00:00
Bruce Momjian 5ddecd1e27 Mention which fsync methods are unavailable. 2004-03-18 14:02:58 +00:00
Bruce Momjian 69138a9429 Add permission mode to opens(). 2004-03-18 04:11:41 +00:00
Bruce Momjian bfaa9a0ada Add missing include 2004-03-18 04:04:36 +00:00
Bruce Momjian 00051c9b56 Remove acccidental object/binary files. 2004-03-18 03:57:58 +00:00
Bruce Momjian 9f2696f266 Add fsync test program. It tests fsync to see if times for fsync are the
same when done on the write() ile descriptor and a new descriptor.

it also times various fsync methods.
2004-03-18 03:56:59 +00:00
Tom Lane fbac1272b8 During btree index build, sort equal-keyed tuples according to their
TID (heap position).  This doesn't do anything to the validity of the
finished index, but by pretending to qsort() that there are no really
equal keys in the sort, we can avoid performance problems with qsort
implementations that have trouble with large numbers of equal keys.
Patch from Manfred Koizar.
2004-03-17 22:24:58 +00:00
Tom Lane 55f7c3300d Reimplement CASE val WHEN compval1 THEN ... WHEN compval2 THEN ... END
so that the 'val' is computed only once, per recent discussion.  The
speedup is not much when 'val' is just a simple variable, but could be
significant for larger expressions.  More importantly this avoids issues
with multiple evaluations of a volatile 'val', and it allows the CASE
expression to be reverse-listed in its original form by ruleutils.c.
2004-03-17 20:48:43 +00:00
Bruce Momjian d245b6bd9f Document SPI_push() and SPI_pop(). 2004-03-17 01:05:10 +00:00
Tom Lane c1352052ef Replace the switching function ExecEvalExpr() with a macro that jumps
directly to the appropriate per-node execution function, using a function
pointer stored by ExecInitExpr.  This speeds things up by eliminating one
level of function call.  The function-pointer technique also enables further
small improvements such as only making one-time tests once (and then
changing the function pointer).  Overall this seems to gain about 10%
on evaluation of simple expressions, which isn't earthshaking but seems
a worthwhile gain for a relatively small hack.  Per recent discussion
on pghackers.
2004-03-17 01:02:24 +00:00
Bruce Momjian 40f456ce56 Remove double-rename used by Win32 on busy files. Not needed anymore. 2004-03-16 05:05:58 +00:00
Bruce Momjian 8526f537cc The "cvs add" of test_thread_implicit.pgc seems to have been missed,
i've attached this again.

Additionally I include a small patch to remove mutex locking when a
DEFAULT/NULL connection is being retrieved. This is consistent with
libpq.

Lee Kindness
2004-03-15 16:27:43 +00:00
Bruce Momjian bda6e04ba0 Check for EOF on pipe differs under win32, as it is based on a socket
implementation.

Claudio Natoli
2004-03-15 16:21:37 +00:00
Bruce Momjian f744c0f760 float8-small-is-zero and float8-exp-three-digits will likely need
similar changes.

Claudio Natoli
2004-03-15 16:20:52 +00:00
Bruce Momjian 3947f653f9 * postmaster.c: cleanup pmdaemonize under win32; missed failure message
in CreateOptsFile
* s_lock.c: minor comment fix
* findbe.c: variables not used under win32 moved within #ifndef WIN32
case

Claudio Natoli
2004-03-15 16:18:43 +00:00
Bruce Momjian dea47eee06 Windows uses codepages rather than the environment, so we work around
that by querying the environment explicitly first for LC_COLLATE and
LC_CTYPE. We have to do this because initdb passes those values in the
environment. If there is nothing there we fall back on the codepage.

Andrew Dunstan
2004-03-15 16:14:26 +00:00
Bruce Momjian d6b57925ca Remove GUC log_statement, log_pid, log_timestamp, log_source_port.
Functionality superceeded by log_line_prefix.

Andrew Dunstan
2004-03-15 15:56:28 +00:00
Bruce Momjian 6812e95a28 Improve random regression tests to fail less frequently. 2004-03-15 15:46:25 +00:00
Tatsuo Ishii e8c3205037 Add PQmbdsplen() which returns the "display length" of a character.
Still some works needed:
- UTF-8, MULE_INTERNAL always returns 1
2004-03-15 10:41:26 +00:00
Tom Lane 1bc2d544b9 Localize our dependencies on the way to create NAN or INFINITY.
Per recent proposal to pghackers.
2004-03-15 03:29:22 +00:00
Tom Lane 89ab5c4abf Remove grotty special-case code in coerce_to_target_type() that
implemented casts to varchar and bpchar using a cast-to-text function.
This is a holdover from before we had pg_cast; it now makes more sense
to just list these casts in pg_cast.  While at it, add pg_cast entries
for the other direction (casts from varchar/bpchar) where feasible.
2004-03-15 01:13:41 +00:00
Bruce Momjian 64fe1fd239 Update Solaris thread flags, per Jim Seymour 2004-03-14 23:51:48 +00:00
Tom Lane 04226b6404 Tweak planner so that index expressions and predicates are matched to
queries without regard to whether coercions are stated explicitly or
implicitly.  Per suggestion from Stephan Szabo.
2004-03-14 23:41:27 +00:00
Tom Lane e1d08faf04 Fix error in termination of COPY IN mode when using V2 protocol.
Report and fix per ljb, 8-Mar-04.
2004-03-14 22:00:54 +00:00
Bruce Momjian 6e7a0f3550 Mark linux as thread-enabled with new 7.5 tests. 2004-03-14 15:06:13 +00:00
Bruce Momjian 48f3ddf991 Fix ecpg_sqlca_key_destructor to return void. 2004-03-14 14:47:33 +00:00
Bruce Momjian b76c536e2e > (I also see some post-7.4.1 changes in src/template/solaris, so you
> possibly should look there too.)
[snip]
>

I think I have the fix for part of it, but this remains...

    gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
    -Wmissing-declarations -fPIC -I. -I../../../src/include
    -D_POSIX_PTHREAD_SEMANTICS -DFRONTEND
    -DSYSCONFDIR='"/usr/local/pgsql/etc"'  -c -o thread.o thread.c
    thread.c: In function `pqGethostbyname':
    thread.c:189: error: `resbuf' undeclared (first use in this
function)

Looking at src/port/thread.c, line 189, it looks like somebody typo'd.
Looks like that second parameter should be "resultbuf", not "resbuf"?

Jim Seymour
2004-03-14 14:01:43 +00:00
Michael Meskes 757fb0e5a9 - Fixed Informix compat math functions to cope with the situations
where one argument takes the result.
- Applied thread patches by Lee Kindness
2004-03-14 12:16:30 +00:00
Neil Conway 80ac9b06ac Portability fixes and bug fixes for recent floating point input changes.
In particular, don't depend on strtod() to accept 'NaN' and 'Infinity'
inputs (while this is required by C99, not all platforms are compliant
with that yet). Also, don't require glibc's behavior from isinf():
it seems that on a lot of platforms isinf() does not itself distinguish
between negative and positive infinity.
2004-03-14 05:22:52 +00:00
Tom Lane 7665d1bc16 Teach psql to show the location of syntax errors visually, per recent
discussions.  Patch by Fabien Coelho and Tom Lane.  Still needs to be
taught about multi-screen-column kanji characters; Tatsuo has promised
to provide the needed infrastructure for that.
2004-03-14 04:25:18 +00:00
Tom Lane a8a3b54724 Arrange to emit a CONTEXT: SQL function "foo" entry in an error
message that is reporting a prechecking error in a SQL function.
This is to cue client-side code that the syntax error position,
if any, is with respect to the function body and not the outer command.
2004-03-14 01:58:41 +00:00
Tom Lane b88fa3b196 Generate a WARNING when the column types in a foreign key constraint are
incompatible enough to prevent indexscanning the referenced table.  Also,
improve the error message that pops out when we can't implement the FK at
all for lack of a usable equality operator.  Fabien Coelho, with some review
by Tom Lane.
2004-03-13 22:09:14 +00:00