Commit Graph

15941 Commits

Author SHA1 Message Date
Tom Lane f1e671a0b4 Increase timeout in statement_timeout test from 1 second to 2 seconds.
We have once or twice seen failures suggesting that control didn't get
to the exception block before the timeout elapsed, which is unlikely
but not impossible in a parallel regression test (with a dozen other
backends competing for cycles).  This change doesn't completely prevent
the problem of course, but it should reduce the probability enough that
we don't see it anymore.  Per buildfarm results.
2006-06-18 16:21:23 +00:00
Peter Eisentraut 5266f221a2 Merge postmaster and postgres command into just postgres. postmaster
symlink is kept for now for compatibility.  To call single-user mode, use
postgres --single.
2006-06-18 15:38:37 +00:00
Tom Lane 44cb3ae7ef Fix a couple of obvious problems in DROP IF EXISTS patch. 2006-06-16 23:50:48 +00:00
Tom Lane c892643a3c Code review for SELECT INTO STRICT patch: use saner choices of error
SQLSTATEs, fix some documentation problems.
2006-06-16 23:29:27 +00:00
Bruce Momjian 4fff9d7290 Document issues with non-default tablespaces and pg_dumpall restores.
Backpatch documentation addition to 8.1.X.
2006-06-16 22:01:17 +00:00
Andrew Dunstan bbcd01692b DROP ... IF EXISTS for the following cases:
language, tablespace, trigger, rule, opclass, function, aggregate. operator, and cast.
2006-06-16 20:23:45 +00:00
Tom Lane 06e10abc0b Fix problems with cached tuple descriptors disappearing while still in use
by creating a reference-count mechanism, similar to what we did a long time
ago for catcache entries.  The back branches have an ugly solution involving
lots of extra copies, but this way is more efficient.  Reference counting is
only applied to tupdescs that are actually in caches --- there seems no need
to use it for tupdescs that are generated in the executor, since they'll go
away during plan shutdown by virtue of being in the per-query memory context.
Neil Conway and Tom Lane
2006-06-16 18:42:24 +00:00
Bruce Momjian 40bc06fa16 Test for POSIX_FADV_DONTNEED to use posix_fadvise(). 2006-06-16 04:11:48 +00:00
Bruce Momjian 94a5c4a01b Use posix_fadvise() to avoid kernel caching of WAL contents on WAL file
close.

ITAGAKI Takahiro
2006-06-15 19:15:00 +00:00
Bruce Momjian a584c12426 Add STRICT to PL/pgSQL SELECT INTO, so exceptions are thrown if more or
less than one row is returned by the SELECT, for Oracle PL/SQL
compatibility.

Improve SELECT INTO documentation.

Matt Miller
2006-06-15 18:02:22 +00:00
Tom Lane 8b9bc234ad Remove the limit on the number of entries allowed in catcaches, and
remove the infrastructure needed to enforce the limit, ie, the global
LRU list of cache entries.  On small-to-middling databases this wins
because maintaining the LRU list is a waste of time.  On large databases
this wins because it's better to keep more cache entries (we assume
such users can afford to use some more per-backend memory than was
contemplated in the Berkeley-era catcache design).  This provides a
noticeable improvement in the speed of psql \d on a 10000-table
database, though it doesn't make it instantaneous.

While at it, use per-catcache settings for the number of hash buckets
per catcache, rather than the former one-size-fits-all value.  It's a
bit silly to be using the same number of hash buckets for, eg, pg_am
and pg_attribute.  The specific values I used might need some tuning,
but they seem to be in the right ballpark based on CATCACHE_STATS
results from the standard regression tests.
2006-06-15 02:08:09 +00:00
Tom Lane 2193beb761 Further thoughts about lo_export/lo_import error handling: if one of
the lower-level large object functions fails, it will have already set
a suitable error message --- probably something from the backend ---
and it is not useful to overwrite that with a generic 'error while
reading large object' message.  So remove redundant messages.
2006-06-14 17:49:25 +00:00
Tom Lane f3164c0200 Clean up psql's control-C handling to avoid longjmp'ing out of random
places --- that risks corrupting data structures, losing sync with the
backend, etc.  We now longjmp only from calls to readline, fgets, and
fread, which we assume are coded to protect themselves against interrupts
at undesirable times.  This requires adding explicit tests for
cancel_pressed in long-running loops, but on the whole it's far cleaner.
Martijn van Oosterhout and Tom Lane.
2006-06-14 16:49:03 +00:00
Tom Lane ace93353ea Improve error detection and recovery in lo_import()/lo_export().
Problems noted while experimenting with new control-C code for psql.
2006-06-14 01:28:55 +00:00
Tom Lane 067e40cc6d Do a CHECK_FOR_INTERRUPTS immediately before terminating a fastpath
function call.  Previously, there may have been no CHECK_FOR_INTERRUPTS
at all in the fastpath code path, making it impossible to cancel an
operation such as \lo_import externally.  This addition doesn't ensure
you can cancel, since your SIGINT may arrive while the backend is idle
waiting for the client, but it gives the largest window we can easily
provide.  Noted while experimenting with new control-C code for psql.
2006-06-14 01:24:14 +00:00
Bruce Momjian 07c25723da Add BY clause to PL/PgSQL FOR loop, to control the iteration increment.
Jaime Casanova
2006-06-12 16:45:30 +00:00
Bruce Momjian e6a7b01930 Avoid use of C commment inside C comment from recent Win32 int overflow patch. 2006-06-12 16:28:52 +00:00
Bruce Momjian 27bff7502f Prevent Win32 from displaying a popup box on backend crash. Instead let
the postmaster deal with it.

Magnus Hagander
2006-06-12 16:17:20 +00:00
Bruce Momjian 9fc6f4e1ae Win32 can't catch the exception thrown by INT_MIN / -1 or INT_MIN * -1,
so on that platform we test for those before the computation and throw
an "out of range" error.

Backpatch to 8.1.X.
2006-06-12 16:09:11 +00:00
Tom Lane e71e02d926 Minor code cleanup: make the WIN32 case less gratuitously different from
the other platform-specific cases in ps_status.
2006-06-12 02:39:49 +00:00
Tom Lane e2e2a9db4c Code review for psql multiline history patch(es). Fix memory leak,
failure to enter commands in history if canceled by control-C, other
infelicities.
2006-06-11 23:06:00 +00:00
Tom Lane bf64a37909 Fix Assert failure when a fastpath function call is attempted inside an
already-aborted transaction block.  GetSnapshotData throws an Assert if
not in a valid transaction; hence we mustn't attempt to set a snapshot
for the function until after checking for aborted transaction.  This is
harmless AFAICT if Asserts aren't enabled (GetSnapshotData will compute
a bogus snapshot, but it doesn't matter since HandleFunctionRequest will
throw an error shortly anywy).  Hence, not a major bug.

Along the way, add some ability to log fastpath calls when statement
logging is turned on.  This could probably stand to be improved further,
but not logging anything is clearly undesirable.

Backpatched as far as 8.0; bug doesn't exist before that.
2006-06-11 15:49:28 +00:00
Tom Lane b773987fc2 Repair remarkably-inefficient query for dumping large object comments: it
was invoking obj_description() for each large object chunk, instead of once
per large object.  This code is new as of 8.1, which may explain why the
problem hadn't been noticed already.
2006-06-09 19:46:09 +00:00
Tom Lane 5de0cbdf0c Revert sampling patch for EXPLAIN ANALYZE; it turns out to be too unreliable
because node timing is much less predictable than the patch expects.  I kept
the API change for InstrStopNode, however.
2006-06-09 19:30:56 +00:00
Tom Lane 1358466a8c Fix bootstrap.c so that database startup process and bgwriter properly release
LWLocks during a panic exit.  This avoids the possible self-deadlock pointed
out by Qingqing Zhou.  Also, I noted that an error during LoadFreeSpaceMap()
or BuildFlatFiles() would result in exit(0) which would leave the postmaster
thinking all is well.  Added a critical section to ensure such errors don't
allow startup to proceed.

Backpatched to 8.1.  The 8.0 code is a bit different and I'm not sure if the
problem exists there; given we've not seen this reported from the field, I'm
going to be conservative about backpatching any further.
2006-06-08 23:55:48 +00:00
Bruce Momjian e36d0a0cbf Remove Win32 file, moved to /port.
Magnus Hagander
2006-06-08 15:15:13 +00:00
Tom Lane 8ff80c1bd3 Remove obsolete comment about VACUUM FULL: it takes buffer content locks
now, and must do so to ensure bgwriter doesn't write a page that is in
process of being compacted.
2006-06-08 14:58:33 +00:00
Bruce Momjian 18aee7968a Allow timezone names in SQL strings,
'2006-05-24 21:11 Americas/New_York'::timestamptz

Joachim Wieland
2006-06-07 22:32:31 +00:00
Bruce Momjian 399a36a75d Prepare code to be built by MSVC:
o  remove many WIN32_CLIENT_ONLY defines
	o  add WIN32_ONLY_COMPILER define
	o  add 3rd argument to open() for portability
	o  add include/port/win32_msvc directory for
	   system includes

Magnus Hagander
2006-06-07 22:24:46 +00:00
Tom Lane d8364f3f8f Per previous analysis, the most correct notion of SampleOverhead is that
it is just the total time to do INSTR_TIME_SET_CURRENT(), and not any of
the other code involved in InstrStartNode/InstrStopNode.  Even though I
fear we may end up reverting this patch altogether, we may as well have
the most correct version in our CVS archive.
2006-06-07 18:49:03 +00:00
Bruce Momjian e9f6679ce2 Have REINDEX use NOTICE, so it can be suppressed. 2006-06-07 17:20:17 +00:00
Tom Lane ae0c8d09fb Remove "fuzzy comparison" logic in qsort comparison function for
choose_bitmap_and().  It was way too fuzzy --- per comment, it was meant to be
1% relative difference, but was actually coded as 0.01 absolute difference,
thus causing selectivities of say 0.001 and 0.000000000001 to be treated as
equal.  I believe this thinko explains Maxim Boguk's recent complaint.  While
we could change it to a relative test coded like compare_fuzzy_path_costs(),
there's a bigger problem here, which is that any fuzziness at all renders the
comparison function non-transitive, which could confuse qsort() to the point
of delivering completely wrong results.  So forget the whole thing and just
do an exact comparison.
2006-06-07 17:08:07 +00:00
Bruce Momjian ca9d50304f For psql multi-line history, save backslash commands right away, rather
than only if there is already history.
2006-06-07 13:18:37 +00:00
Bruce Momjian 9c351695dc Use INFO-level for reindex messages, rather than NOTICE.
Euler Taveira de Oliveira
2006-06-07 13:13:16 +00:00
Bruce Momjian 6ca917adff Update comment. 2006-06-06 22:41:09 +00:00
Bruce Momjian 62e7ad6603 On Win32, return original patch if GetShortPathName() fails (no short
name, path does not exist), rather than returning nothing.

Backpatch to 8.1.X.
2006-06-06 22:32:19 +00:00
Tom Lane 8a30cc2127 Make the planner estimate costs for nestloop inner indexscans on the basis
that the Mackert-Lohmann formula applies across all the repetitions of the
nestloop, not just each scan independently.  We use the M-L formula to
estimate the number of pages fetched from the index as well as from the table;
that isn't what it was designed for, but it seems reasonably applicable
anyway.  This makes large numbers of repetitions look much cheaper than
before, which accords with many reports we've received of overestimation
of the cost of a nestloop.  Also, change the index access cost model to
charge random_page_cost per index leaf page touched, while explicitly
not counting anything for access to metapage or upper tree pages.  This
may all need tweaking after we get some field experience, but in simple
tests it seems to be giving saner results than before.  The main thing
is to get the infrastructure in place to let cost_index() and amcostestimate
functions take repeated scans into account at all.  Per my recent proposal.

Note: this patch changes pg_proc.h, but I did not force initdb because
the changes are basically cosmetic --- the system does not look into
pg_proc to decide how to call an index amcostestimate function, and
there's no way to call such a function from SQL at all.
2006-06-06 17:59:58 +00:00
Bruce Momjian 63e464a5e6 Remove ancient AIX structure workaround. 2006-06-06 16:20:11 +00:00
Bruce Momjian ed3b2e696b Have BCC echo output "" using "", rather than \"\" as earlier reported.
Backpatch to 8.1.X.
2006-06-06 16:17:20 +00:00
Michael Meskes 0251602fc9 Fixed two more memory leaks in ecpglib.
Synced parser.
2006-06-06 11:31:55 +00:00
Tom Lane ff0ac57db9 Remove extremely old, incomplete, broken example code.
Per my proposal a few days ago.
2006-06-05 21:16:32 +00:00
Tom Lane 7868590c61 While making the seq_page_cost changes, I was struck by the fact that
cost_nonsequential_access() is really totally inappropriate for its only
remaining use, namely estimating I/O costs in cost_sort().  The routine
was designed on the assumption that disk caching might eliminate the need
for some re-reads on a random basis, but there's nothing very random in
that sense about sort's access pattern --- it'll always be picking up the
oldest outputs.  If we had a good fix on the effective cache size we
might consider charging zero for I/O unless the sort temp file size
exceeds it, but that's probably putting much too much faith in the
parameter.  Instead just drop the logic in favor of a fixed compromise
between seq_page_cost and random_page_cost per page of sort I/O.
2006-06-05 20:56:33 +00:00
Bruce Momjian b7af62e4a9 Avoid longjump/vfork warning about line_saved_in_history variable by
making it volatile.
2006-06-05 14:47:38 +00:00
Bruce Momjian a073a70415 Have psql history save \e editor contents to history before query is
executed, like it did for 8.1.X.
2006-06-05 03:55:00 +00:00
Tom Lane e4de635a2b Increase the default value of cpu_index_tuple_cost from 0.001 to 0.005.
This shouldn't affect simple indexscans much, while for bitmap scans that
are touching a lot of index rows, this seems to bring the estimates more
in line with reality.  Per recent discussion.
2006-06-05 03:03:42 +00:00
Tom Lane eed6c9ed7e Add a GUC parameter seq_page_cost, and use that everywhere we formerly
assumed that a sequential page fetch has cost 1.0.  This patch doesn't
in itself change the system's behavior at all, but it opens the door to
people adopting other units of measurement for EXPLAIN costs.  Also, if
we ever decide it's worth inventing per-tablespace access cost settings,
this change provides a workable intellectual framework for that.
2006-06-05 02:49:58 +00:00
Bruce Momjian a837851dc0 Fix psql so \r is separate in the history, rather than at the end of
the query.
2006-06-04 04:35:55 +00:00
Tom Lane f2de12e50e Don't choke during startup if the environment offers an invalid value
for LC_MESSAGES; instead, just press forward, leaving the effective setting
at 'C'.  There is not any very good reason to complain when we are going
to replace the value soon with whatever postgresql.conf says.  This change
should solve the occasionally-reported problem of initdb failing with
'failed to initialize lc_messages'; the current theory is that that is
a reflection of either wrong LANG/LC_MESSAGES or completely broken locale
support.
2006-06-03 17:36:10 +00:00
Tom Lane 84e741f4f9 Fix copy-and-pasteo in Russian translation: message complaining about
HAVE_INT64_TIMESTAMP was mentioning PG_CONTROL_VERSION instead.
Victor Snezhko
2006-06-03 16:48:59 +00:00
Bruce Momjian be05b260a9 Remove pg_resetxlog -r flag, feature has problems referenced here:
http://archives.postgresql.org/pgsql-hackers/2006-05/msg00002.php
2006-06-03 02:19:24 +00:00
Tom Lane 87e8014d31 Respond to Jeremy Drake's original gripe that \copy needs to recognize
E'...' syntax for strings in order to track the backend.
2006-06-01 01:28:00 +00:00
Tom Lane 6178762fcf Fix up hack to suppress escape_string_warning so that it actually works
and there's only one place that's a kluge, ie, appendStringLiteralConn.
Note that pg_dump itself doesn't use appendStringLiteralConn, so its
behavior is not affected; only the other utility programs care.
2006-06-01 00:15:36 +00:00
Tom Lane c6d3c1b817 Fix seriously broken patch for psql '' ... per its comment, emit() is
NOT the thing to use here.
2006-05-31 22:11:44 +00:00
Tom Lane 8f165ee13b Make PG_MODULE_MAGIC required in shared libraries that are loaded into
the server.  Per discussion, there seems no point in a waiting period
before making this required.
2006-05-31 20:58:09 +00:00
Bruce Momjian c3c3902611 Support '' for literal ' in psql single-quote strings, documentation update. 2006-05-31 11:35:17 +00:00
Bruce Momjian eaca1175e9 Escape processing patch:
o  turns off escape_string_warning in pg_dumpall.c
        o  optionally use E'' for \password (undocumented option?)
        o  honor standard_conforming-strings for \copy (but not
           support literal E'' strings)
        o  optionally use E'' for \d commands
        o  turn off escape_string_warning for createdb, createuser,
           droplang
2006-05-31 11:02:42 +00:00
Bruce Momjian 751d985805 Update cvs command example to show diff -rBASE. 2006-05-31 10:24:29 +00:00
Michael Meskes 085e7c2fd8 Somehow a ";" got lost which changed the logic. This btw is the first fix resulting from SoC. 2006-05-31 08:12:48 +00:00
Tom Lane a0ffab351e Magic blocks don't do us any good unless we use 'em ... so install one
in every shared library.
2006-05-30 22:12:16 +00:00
Tom Lane e60cb3a35c Code review for magic-block patch. Remove separate header file pgmagic.h,
as this seems only likely to create headaches for module developers.  Put
the macro in the pre-existing fmgr.h file instead.  Avoid being too cute
about how many fields we can cram into a word, and avoid trying to fetch
from a library we've already unlinked.
Along the way, it occurred to me that the magic block really ought to be
'const' so it can be stored in the program text area.  Do the same for
the existing data blocks for PG_FUNCTION_INFO_V1 functions.
2006-05-30 21:21:30 +00:00
Tom Lane a18ebc5541 Code review for EXPLAIN patch. Fix some typos, make it behave sanely
across multiple loops, get rid of the shaky assumption that exactly one
tuple is returned per node iteration.
2006-05-30 19:24:25 +00:00
Tom Lane 3993bd8e07 PostmasterIsAlive test really ought to be in the inner loop for safety. 2006-05-30 17:08:14 +00:00
Tom Lane 03f963640f Remove pqsignalinquire(), which is unused and has portability issues. 2006-05-30 15:57:56 +00:00
Tom Lane d898de1f3b Update ppport.h to not cause warnings with newest Perl versions.
This is just the minimal necessary change; we might want to adopt
later PPPort output instead.
2006-05-30 15:48:20 +00:00
Bruce Momjian 01b2168c90 Add pgmagic header block to store compile-time constants:
It now only checks four things:

Major version number (7.4 or 8.1 for example)
NAMEDATALEN
FUNC_MAX_ARGS
INDEX_MAX_KEYS

The three constants were chosen because:

1. We document them in the config page in the docs
2. We mark them as changable in pg_config_manual.h
3. Changing any of these will break some of the more popular modules:

FUNC_MAX_ARGS changes fmgr interface, every module uses this NAMEDATALEN
changes syscache interface, every PL as well as tsearch uses this
INDEX_MAX_KEYS breaks tsearch and anything using GiST.

Martijn van Oosterhout
2006-05-30 14:09:32 +00:00
Bruce Momjian 87bd07d979 Make EXPLAIN sampling smarter, to avoid excessive sampling delay.
Martijn van Oosterhout
2006-05-30 14:01:58 +00:00
Tom Lane 53d669e5c6 Clarify the HINT for 'checkpoint request failed', per recent complaint
demonstrating that its intent wasn't obvious.
2006-05-30 13:58:49 +00:00
Bruce Momjian 4d06e86d04 Revert patch, needs more work:
---------------------------------------------------------------------------

Add dynamic record inspection to PL/PgSQL, useful for generic triggers:

  tval2 := r.(cname);

or

  columns := r.(*);

Titus von Boxberg
2006-05-30 13:40:56 +00:00
Bruce Momjian fc079f8411 Move conversion dependency patch to the proper branch, out of 8.1.X,
into HEAD.
2006-05-30 13:36:30 +00:00
Bruce Momjian 9eb0d6a6b2 Prevent multiple archivers from starting. Backpatch to 8.1.X.
Simon Riggs
2006-05-30 13:30:49 +00:00
Bruce Momjian 26cfefabad Fix printf mask for SizeVfdCache
Qingqing Zhou
2006-05-30 13:04:59 +00:00
Bruce Momjian 39b031d417 Add "inline" compile fix for MSVC/BCC:
#define inline __inline

Backpatch to 8.1.X.

Hiroshi Saito
2006-05-30 12:43:28 +00:00
Bruce Momjian 38c7700f56 Add dynamic record inspection to PL/PgSQL, useful for generic triggers:
tval2 := r.(cname);

or

  columns := r.(*);

Titus von Boxberg
2006-05-30 12:03:13 +00:00
Bruce Momjian 88ba64d396 Back out patch, wrong previous commit message. 2006-05-30 11:58:05 +00:00
Bruce Momjian b6477c6295 Add regexp_replace() to string functions section.
Joachim Wieland
2006-05-30 11:54:51 +00:00
Tom Lane d52a97dd7e Fix ancient misdescription of namegt/namege in comment. Greg Stark 2006-05-30 05:22:59 +00:00
Bruce Momjian e8ea69e3fa Patch reverted because of random buildfarm failures:
---------------------------------------------------------------------------

Delay write of pg_stats file to once every five minutes, during
shutdown, or when requested by a backend:

It changes so the file is only written once every 5 minutes (changeable
of course, I just picked something) instead of once every half second.
It's still written when the stats collector shuts down, just as before.
And it is now also written on backend request. A backend requests a
rewrite by simply sending a special stats message. It operates on the
assumption that the backends aren't actually going to read the
statistics file very often, compared to how frequent it's written today.

Magnus Hagander
2006-05-30 02:35:39 +00:00
Bruce Momjian fa54cd0432 Add PQclear() calls, for completeness (exits shortly anyway). 2006-05-29 19:52:46 +00:00
Andrew Dunstan 21e343da35 Make plperl's $_TD trigger data a global rather than a lexical variable,
with a fresh local value for each invocation, to avoid unexpected sharing
violations. Per recent -hackers discussion.
2006-05-29 13:51:23 +00:00
Teodor Sigaev b32000eda4 Som improve page split in multicolumn GiST index.
If user picksplit on n-th column generate equals
left and right unions then it calls picksplit on n+1-th
column.
2006-05-29 12:50:06 +00:00
Teodor Sigaev 0a6fde5a26 Correct cheking in findParents(). i
From Andreas Seltenreich <andreas+pg@gate450.dyndns.org>
2006-05-29 08:39:44 +00:00
Tom Lane fd15c87ad7 enlargePQExpBuffer, alone among the functions exported by pqexpbuffer.h,
wasn't exported by exports.txt.  Ooops.  Per buildfarm results.
2006-05-28 22:42:05 +00:00
Tom Lane 134b463f02 Fix up pg_dump to do string escaping fully correctly for client encoding
and standard_conforming_strings; likewise for the other client programs
that need it.  As per previous discussion, a pg_dump dump now conforms
to the standard_conforming_strings setting of the source database.
We don't use E'' syntax in the dump, thereby improving portability of
the SQL.  I added a SET escape_strings_warning = off command to keep
the dumps from getting a lot of back-chatter from that.
2006-05-28 21:13:54 +00:00
Alvaro Herrera 117d73a9e7 Don't call PQclear until the struct is really no longer going to be used.
Per Coverity bug #304.  Thanks to Martijn van Oosterhout for reporting it.

Zero out the pointer fields of PGresult so that these mistakes are more
easily catched, per discussion.
2006-05-28 17:23:29 +00:00
Andrew Dunstan 7a6676d9df fix typo 2006-05-28 03:12:00 +00:00
Andrew Dunstan 3a9ae3d206 TG_table_name and TG_table_schema for plpgsql, plus docs and regression. 2006-05-28 03:03:17 +00:00
Alvaro Herrera 3d58a1c168 Remove traces of otherwise unused RELKIND_SPECIAL symbol. Leave the psql bits
in place though, so that it plays nicely with older servers.

Per discussion.
2006-05-28 02:27:08 +00:00
Andrew Dunstan 22b118b530 TG_table_name and TG_table_schema for pl/tcl, plus regression test and docs. 2006-05-27 20:24:16 +00:00
Tom Lane 4627a8f419 Revert ill-considered change to plpgsql: it should not rely on the
current setting of standard_conforming_strings to decide how to quote
strings that will be used later.  There is much more to do here but
this particular change breaks the build on Windows, so fix it now.
2006-05-27 19:45:52 +00:00
Tom Lane 58a2dbc740 Fix initdb to properly escape quotes and backslashes in the supplied
superuser password, and also in the paths of the various files it issues
SQL COPY commands for.  Per bug #2424.
2006-05-27 18:07:06 +00:00
Tom Lane 0780ce6a93 Re-introduce the yylex filter function formerly used to support UNION
JOIN, which I removed in a recent fit of over-optimism that we wouldn't
have any future use for it.  Now it's needed to support disambiguating
WITH CHECK OPTION from WITH TIME ZONE.  As proof of concept, add stub
grammar productions for WITH CHECK OPTION.
2006-05-27 17:38:46 +00:00
Andrew Dunstan 51b40f03a4 Looks like the new plpython regression test fails on older pythons. See if this works. 2006-05-27 12:39:11 +00:00
Bruce Momjian 7a846ecc00 Use E'' strings internally only when standard_conforming_strings =
'off'. This allows pg_dump output with standard_conforming_strings =
'on' to generate proper strings that can be loaded into other databases
without the backslash doubling we typically do.  I have added the
dumping of the standard_conforming_strings value to pg_dump.

I also added standard backslash handling for plpgsql.
2006-05-26 23:48:54 +00:00
Tom Lane 4d63e26774 Further hacking on performance of COPY OUT. It seems that fwrite()'s
per-call overhead is quite significant, at least on Linux: whatever
it's doing is more than just shoving the bytes into a buffer.  Buffering
the data so we can call fwrite() just once per row seems to be a win.
2006-05-26 22:50:02 +00:00
Tom Lane 223ae6957f Support binary COPY through psql. Also improve detection of write errors
during COPY OUT.  Andreas Pflug, some editorialization by moi.
2006-05-26 19:51:29 +00:00
Andrew Dunstan 0a269db9cf Add table_name and table_schema to plpython trigger data, plus docs and regression test. 2006-05-26 19:23:09 +00:00
Andrew Dunstan 777f72cd37 Add table_name and table_schema to plperl trigger data. relname is
kept but now deprecated. Patch from Adam Sjøgren. Add regression test to
show plperl trigger data (Andrew).
TBD: apply similar changes to plpgsql, plpython and pltcl.
2006-05-26 17:34:16 +00:00
Teodor Sigaev 5d1a066e64 Fix findParents() in case of multiple levels to find.
By Andreas Seltenreich <andreas+pg@gate450.dyndns.org>
2006-05-26 08:01:17 +00:00
Tom Lane 0a5fdb0d91 Reduce per-character overhead in COPY OUT by combining calls to
CopySendData.
2006-05-25 18:42:17 +00:00
Tom Lane c76cb77105 Fix pg_restore to process BLOB COMMENT entries correctly; they aren't
really tables and shouldn't get DISABLE TRIGGER processing.  Per bug
#2452 from Robert Treat.
2006-05-24 21:20:11 +00:00