Commit Graph

22057 Commits

Author SHA1 Message Date
Bruce Momjian b04d19f230 Fix PG_VERSION_NUM for different awk -F handling. 2006-02-28 22:34:24 +00:00
Bruce Momjian c979afb7e0 Fix PG_VERSION_NUM awk -F parameter. 2006-02-28 21:59:19 +00:00
Neil Conway 2b8afe6193 Tweak the error message emitted when a void-returning PL/Python function
does not return None, per suggestion from Tom.
2006-02-28 20:56:14 +00:00
Neil Conway 87daae1143 Allow PL/Python functions to return void, per gripe from James Robinson
(I didn't use his patch, however). A void-returning PL/Python function
must return None (from Python), which is translated into a void datum
(and *not* NULL) for Postgres. I also added some regression tests for
this functionality.
2006-02-28 20:03:52 +00:00
Bruce Momjian c6b6f7ad64 Add:
* Split out libpq pgpass and environment documentation sections to make
  it easier for non-developers to find
2006-02-28 19:48:03 +00:00
Bruce Momjian 03024ca5a1 Add PG_VERSION_NUM for use by 3rd party applications wanting to test the
backend version in C using > and < comparisons.
2006-02-28 16:41:21 +00:00
Tom Lane d2c555ee53 Teach nodeSort and nodeMaterial to optimize out unnecessary overhead
when the passed-down eflags indicate they can.
Simon Riggs and Tom Lane
2006-02-28 05:48:44 +00:00
Tom Lane 2c0ef9777c Extend the ExecInitNode API so that plan nodes receive a set of flag
bits indicating which optional capabilities can actually be exercised
at runtime.  This will allow Sort and Material nodes, and perhaps later
other nodes, to avoid unnecessary overhead in common cases.
This commit just adds the infrastructure and arranges to pass the correct
flag values down to plan nodes; none of the actual optimizations are here
yet.  I'm committing this separately in case anyone wants to measure the
added overhead.  (It should be negligible.)

Simon Riggs and Tom Lane
2006-02-28 04:10:28 +00:00
Peter Eisentraut 7f4f42fa10 Clean up CREATE FUNCTION syntax usage in contrib and elsewhere, in
particular get rid of single quotes around language names and old WITH ()
construct.
2006-02-27 16:09:50 +00:00
Peter Eisentraut fe83b3ebc6 contrib uninstall scripts
by David Fetter
2006-02-27 12:54:39 +00:00
Bruce Momjian d46fbef386 Add mention that tid perhaps someday should be output as a record. 2006-02-27 01:41:16 +00:00
Tom Lane 909ca1407c Improve sorting speed by pre-extracting the first sort-key column of
each tuple, as per my proposal of several days ago.  Also, clean up
sort memory management by keeping all working data in a separate memory
context, and refine the handling of low-memory conditions.
2006-02-26 22:58:12 +00:00
Neil Conway e1f06d8057 Fix a few minor typos in comments in PL/Perl. 2006-02-26 22:26:39 +00:00
Bruce Momjian 52d010d857 Done:
> * -Add 'tid != tid ' operator for use in corruption recovery
2006-02-26 21:22:47 +00:00
Neil Conway 41cba49e95 Implement the <> operator for the tid type. Original patch from Mark
Kirkwood, minor improvements by Neil Conway. The regression tests have
been updated and the catversion has been bumped.
2006-02-26 18:36:23 +00:00
Neil Conway c5e0415a28 Minor SGML work: add some more hyperlinks, where appropriate. 2006-02-26 03:20:46 +00:00
Neil Conway 4d39c6bcf5 Fix typo in comment. 2006-02-26 02:23:41 +00:00
Neil Conway f33d3bc0bf TODO updates:
- "Add ON COMMIT capability to CREATE TABLE AS ... SELECT" is done

- "Allow PREPARE to automatically determine parameter types" is done

- "Clean up compiler warnings (especially with gcc version 4)" is done:
  AFAIK there are no remaining gcc4 compiler warnings to be fixed.

- Creating rules to do view updates is *not* an easy TODO item
2006-02-26 01:21:57 +00:00
Peter Eisentraut e6917b1255 Remove ora2pg; now available at <http://www.samse.fr/GPL/ora2pg/>. 2006-02-25 19:18:58 +00:00
Bruce Momjian 305c82e6bb Add intervals:
> 	o Allow infinite dates and intervals just like infinite timestamps
2006-02-25 16:34:52 +00:00
Bruce Momjian 8c71af130c Fix computation of sample table size. 2006-02-25 04:28:54 +00:00
Bruce Momjian 8e8972832a Remove duplicate:
< 	o %Disallow dropping of an inherited constraint
2006-02-25 03:40:14 +00:00
Bruce Momjian 0915d370f5 Remove mention of MIN/MAX() not using indexes. 2006-02-24 14:59:54 +00:00
Bruce Momjian eb8f9cc066 Mention that the archive history file has the wal start/stop file names. 2006-02-24 14:03:01 +00:00
Peter Eisentraut 268c1b6077 The Makefile was invoking perl scripts as ./script.pl. This fails when
the script is not executable as UCS_to_most.pl is in CVS.  It also won't
pick up any custom setting of the perl version/location to use.  This
patch calls perl scripts like $(PERL) $(srcdir)/script.pl.

Kris Jurka
2006-02-24 13:25:44 +00:00
Andrew Dunstan 2b695717a7 Make restricted_exec feature for Windows more robust by using the environment
to pass the flag instead of the command line - some implementations of
getopt fail if getopt arguments are present after non-getopt arguments.
2006-02-24 02:02:41 +00:00
Andrew Dunstan b5fe16d09f make initdb -U username work as advertised; back out bogus patch at rev 1.42
and supply real fix for problem it tried to address.
2006-02-24 00:55:49 +00:00
Tom Lane f87d4875e9 Fix vacuumlo to avoid unnecessary use of backslash in search pattern.
Per Michael Fuhr.
2006-02-23 22:33:59 +00:00
Neil Conway 737651f6be Cleanup the usage of ScanDirection: use the symbolic names for the
possible ScanDirection alternatives rather than magic numbers
(-1, 0, 1).  Also, use the ScanDirection macros in a few places
rather than directly checking whether `dir == ForwardScanDirection'
and the like. Per patch from James William Pye. His patch also
changed ScanDirection to be a "char" rather than an enum, which
I haven't applied.
2006-02-21 23:01:54 +00:00
Tom Lane 3666260ffd Fix old pg_dump oversight: default values for domains really need to be dumped
by decompiling the typdefaultbin expression, not just printing the typdefault
text which may be out-of-date or assume the wrong schema search path.  (It's
the same hazard as for adbin vs adsrc in column defaults.)  The catalogs.sgml
spec for pg_type implies that the correct procedure is to look to
typdefaultbin first and consider typdefault only if typdefaultbin is NULL.
I made dumping of both domains and base types do that, even though in the
current backend code typdefaultbin is always correct for domains and
typdefault for base types --- might as well try to future-proof it a little.
Per bug report from Alexander Galler.
2006-02-21 18:01:32 +00:00
Tom Lane af49a1634f Adjust probe for getaddrinfo to cope with macro-ized definitions, such
as Tru64's.  Per previous discussion.
2006-02-21 06:06:50 +00:00
Neil Conway 45594a6859 Fix three Python reference leaks in PLy_traceback(). This would result
in leaking memory when invoking a PL/Python procedure that raises an
exception. Unfortunately this still leaks memory, but at least the
largest leak has been plugged.

This patch also fixes a reference counting mistake in PLy_modify_tuple()
for 8.0, 8.1 and HEAD: we don't actually own a reference to `platt', so
we shouldn't Py_DECREF() it.
2006-02-20 20:10:37 +00:00
Teodor Sigaev dde9457294 Fixing and improve compound word support. This changes cannot be applied to
previous version iwthout recreating tsvector fields...

Thanks to Alexander Presber <aljoscha@weisshuhn.de> to discover a problem.
2006-02-20 17:51:05 +00:00
Tom Lane 21e2544aa7 Update obsolete comment. 2006-02-19 19:59:53 +00:00
Tom Lane b34aa3372f Modify logtape.c so that the initial LogicalTapeSetCreate call only
allocates the control data.  The per-tape buffers are allocated only
on first use.  This saves memory in situations where tuplesort.c
overestimates the number of tapes needed (ie, there are fewer runs
than tapes).  Also, this makes legitimate the coding in inittapes()
that includes tape buffer space in the maximum-memory calculation:
when inittapes runs, we've already expended the whole allowed memory
on tuple storage, and so we'd better not allocate all the tape buffers
until we've flushed some tuples out of memory.
2006-02-19 05:58:36 +00:00
Tom Lane df700e6b40 Improve tuplesort.c to support variable merge order. The original coding
with fixed merge order (fixed number of "tapes") was based on obsolete
assumptions, namely that tape drives are expensive.  Since our "tapes"
are really just a couple of buffers, we can have a lot of them given
adequate workspace.  This allows reduction of the number of merge passes
with consequent savings of I/O during large sorts.

Simon Riggs with some rework by Tom Lane
2006-02-19 05:54:06 +00:00
Neil Conway 85c0eac1af Add TABLESPACE and ON COMMIT clauses to CREATE TABLE AS. ON COMMIT is
required by the SQL standard, and TABLESPACE is useful functionality.
Patch from Kris Jurka, minor editorialization by Neil Conway.
2006-02-19 00:04:28 +00:00
Neil Conway 8c5dfbabff Minor SGML style police work. 2006-02-18 23:14:45 +00:00
Peter Eisentraut 3228a92ccd &apos; is not valid HTML 4.01, so print the plain character instead. 2006-02-18 22:54:50 +00:00
Neil Conway ce9b75db6b Patch from Marko Kreen:
pgcrypto crypt()/md5 and hmac() leak memory when compiled against
OpenSSL as openssl.c digest ->reset will do two DigestInit calls
against a context.  This happened to work with OpenSSL 0.9.6
but not with 0.9.7+.

Reason for the messy code was that I tried to avoid creating
wrapper structure to transport algorithm info and tried to use
OpenSSL context for it.  The fix is to create wrapper structure.

It also uses newer digest API to avoid memory allocations
on reset with newer OpenSSLs.

Thanks to Daniel Blaisdell for reporting it.
2006-02-18 20:48:51 +00:00
Peter Eisentraut 1b658473ea Add support for Windows codepages 1253, 1254, 1255, and 1257 and clean
up a bunch of the support utilities.

In src/backend/utils/mb/Unicode remove nearly duplicate copies of the
UCS_to_XXX perl script and replace with one version to handle all generic
files.  Update the Makefile so that it knows about all the map files.
This produces a slight difference in some of the map files, using a
uniform naming convention and not mapping the null character.

In src/backend/utils/mb/conversion_procs create a master utf8<->win
codepage function like the ISO 8859 versions instead of having a separate
handler for each conversion.

There is an externally visible change in the name of the win1258 to utf8
conversion.  According to the documentation notes, it was named
incorrectly and this changes it to a standard name.

Running the Unicode mapping perl scripts has shown some additional mapping
changes in koi8r and iso8859-7.
2006-02-18 16:15:23 +00:00
Neil Conway a6d3b5b944 Mark unescape_single_char() "static": as far as I can see this function
is only used by scan.l/scan.c
2006-02-18 01:44:35 +00:00
Neil Conway ea9eca2c20 Fix typo in comment. 2006-02-17 03:29:02 +00:00
Peter Eisentraut 15a3c33164 Change MemSet to use long instead of int32, for better performance on
64-bit platforms.

by ITAGAKI Takahiro
2006-02-16 23:23:50 +00:00
Peter Eisentraut 422998d275 Put the first section of a chapter in its own chunk. 2006-02-16 01:03:48 +00:00
Tom Lane bba11cdd97 Since we only use libld on AIX, don't include it in LIBS on any other
platforms (it does exist on HPUX, for one).  We could probably even make
this a test for specific AIX versions, but I don't know which ones need it.
2006-02-15 17:23:10 +00:00
Tom Lane 0ad14ebc8d Repair --single-transaction patch so it handles blobs correctly.
Simon Riggs
2006-02-14 23:30:43 +00:00
Tom Lane 2d7f694729 Move btbulkdelete's vacuum_delay_point() call to a place in the loop where
we are not holding a buffer content lock; where it was, InterruptHoldoffCount
is positive and so we'd not respond to cancel signals as intended.  Also
add missing vacuum_delay_point() call in btvacuumcleanup.  This should fix
complaint from Evgeny Gridasov about failure to respond to SIGINT/SIGTERM
in a timely fashion (bug #2257).
2006-02-14 17:20:01 +00:00
Tom Lane 49758f4703 Add some missing vacuum_delay_point calls in GIST vacuuming. 2006-02-14 16:39:32 +00:00
Tom Lane 006320e1d4 AllocSetStats should probably be using unsigned format to show space totals. 2006-02-14 15:34:46 +00:00