summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Small cleanups for pgcrypto. Marko KreenTom Lane2005-07-186-14/+29
|
* Fix C++-style comments, per Rocco Altier.Tom Lane2005-07-182-4/+4
|
* MemSet() must not cast its pointer argument to int32* until after it hasTom Lane2005-07-181-4/+5
| | | | | | | checked that the pointer is actually word-aligned. Casting a non-aligned pointer to int32* is technically illegal per the C spec, and some recent versions of gcc actually generate bad code for the memset() when given such a pointer. Per report from Andrew Morrow.
* Make pg_regress accept a command-line option for the temporary installation'sTom Lane2005-07-172-5/+19
| | | | | | | port number, and use a default value for it that is dependent on the configuration-time DEF_PGPORT. Should make the world safe for running parallel 'make check' in different branches. Back-patch as far as 7.4 so that this actually is useful.
* Fix create_unique_plan() so it doesn't generate useless entries in theTom Lane2005-07-151-28/+45
| | | | | | | | output targetlist of the Unique or HashAgg plan. This code was OK when written, but subsequent changes to use "physical tlists" where possible had broken it: given an input subplan that has extra variables added to avoid a projection step, it would copy those extra variables into the upper tlist, which is pointless since a projection has to happen anyway.
* Fix SGML spacing.Bruce Momjian2005-07-151-7/+4
|
* Check for out-of-range varoattno in deparse_context_for_subplan.Tom Lane2005-07-151-5/+11
| | | | | | | I have seen this case in CVS tip due to new "physical tlist" optimization for subqueries. I believe it probably can't happen in existing releases, but the check is not going to hurt anything, so backpatch to 8.0 just in case.
* Fix overenthusiastic optimization of 'x IN (SELECT DISTINCT ...)' and relatedTom Lane2005-07-153-45/+210
| | | | | | | cases: we can't just consider whether the subquery's output is unique on its own terms, we have to check whether the set of output columns we are going to use will be unique. Per complaint from Luca Pireddu and test case from Michael Fuhr.
* Adjust permissions checking for ALTER OWNER commands: instead ofTom Lane2005-07-1412-109/+229
| | | | | | | | | | | requiring superuserness always, allow an owner to reassign ownership to any role he is a member of, if that role would have the right to create a similar object. These three requirements essentially state that the would-be alterer has enough privilege to DROP the existing object and then re-CREATE it as the new role; so we might as well let him do it in one step. The ALTER TABLESPACE case is a bit squirrely, but the whole concept of non-superuser tablespace owners is pretty dubious anyway. Stephen Frost, code review by Tom Lane.
* Enable multi-byte thousands_sep and decimal_point for numericsep.Bruce Momjian2005-07-141-37/+39
|
* Make better thousands_sep default based on decimal marker value.Bruce Momjian2005-07-141-2/+4
|
* Change numericsep to a boolean, and make it locale-aware.Bruce Momjian2005-07-145-76/+93
|
* Add numeric separator support for latex and troff output methods.Bruce Momjian2005-07-141-19/+67
|
* Mark xml2 CREATE FUNCTIONs as IMMUTABLE, and use the "STRICT" syntaxNeil Conway2005-07-141-13/+13
| | | | | rather than the deprecated "WITH (isStrict)" syntax. Patch from Ilia Kantor, minor editorializing by Neil Conway.
* barebones variable name -> tuples_only, for consistency.Bruce Momjian2005-07-142-51/+51
|
* Fix malloc length for new numeric separator patch.Bruce Momjian2005-07-141-62/+26
| | | | Centralize malloc into function.
* This doc patch replaces all inappropriate references to SQL:1999 when itNeil Conway2005-07-1413-41/+39
| | | | | is used as if it were the latest (and/or still valid) SQL standard. SQL:2003 is used in its place. Patch from Simon Riggs.
* Integrate autovacuum functionality into the backend. There's still aTom Lane2005-07-1425-90/+1678
| | | | | few loose ends to be dealt with, but it seems to work. Alvaro Herrera, based on the contrib code by Matthew O'Connor.
* Fix a couple of bogus comments, per Alvaro.Tom Lane2005-07-132-5/+5
|
* Remove extraneous space after -L ... it confuses SHLIB_LINK filter -LTom Lane2005-07-131-2/+2
| | | | hack.
* Fix unwanted side-effects of recent SHLIB_LINK -L patch on existingTom Lane2005-07-131-6/+9
| | | | hacking of SHLIB_LINK for HPUX.
* Fix #elif spacing too.Bruce Momjian2005-07-131-1/+2
|
* Fix libpq memory leak during PQreset() --- closePGconn() was notTom Lane2005-07-131-2/+30
| | | | freeing all transient state of the PGconn object.
* Fix pgindent to not have blank line before #else in variable definitionBruce Momjian2005-07-131-2/+3
| | | | section of a function.
* Add backslashes to parentheses in awk regex because if not, they areBruce Momjian2005-07-131-6/+6
| | | | treated as regex groups.
* Move -L flag around for shared builds:Bruce Momjian2005-07-131-2/+2
| | | | | | | | | | | | I wrote: > So either we code up some intelligence to put the "C" in the right > position or we have to pass down "A B" and "D" separately from the > main makefile. The following patch might just do the former. Please try it out. Peter E.
* Documentation for some new PL/Perl features. Patch from David Fetter,Neil Conway2005-07-131-17/+81
| | | | various editorialization from Neil Conway.
* Hack around the discrepancy between default library search paths forTom Lane2005-07-121-1/+8
| | | | | gcc and for HP's ld on HPUX. There may be better ways to do this, but this seems to work for me...
* Fix plperl crash with list value return for an array result type.Tom Lane2005-07-121-3/+3
| | | | Reported by Michael Fuhr, fixed by Andrew Dunstan.
* More pgcrypto fixes: handle long messages correctly, suppressTom Lane2005-07-1212-11/+104
| | | | compiler warnings. Marko Kreen and Kris Jurka.
* Improve comments for AdjustIntervalForTypmod.Bruce Momjian2005-07-126-25/+14
| | | | Blank line adjustments.
* Change 5e0 to 5.0, for consistency.Bruce Momjian2005-07-123-33/+33
|
* Fix plperl to do recursion safely, and fix a problem with array results.Tom Lane2005-07-123-19/+128
| | | | Add suitable regression tests. Andrew Dunstan
* Further tweaking of Win32-specific random code. Marko KreenTom Lane2005-07-111-3/+2
|
* I forgot to update win32 code when doing a renaming in random.c.Tom Lane2005-07-111-2/+2
| | | | Marko Kreen
* Avoid bzero/bxopy in favor of more standard library routines.Tom Lane2005-07-111-32/+27
| | | | Marko Kreen
* More pgcrypto fixes: avoid bogus alignment assumptions in sha2,Tom Lane2005-07-1129-90/+99
| | | | | | be more wary about having a value for BYTE_ORDER, clean up randomly- chosen ways of including Postgres core headers. Marko Kreen and Tom Lane
* Add support for AES cipher with older OpenSSL libraries.Tom Lane2005-07-111-14/+41
| | | | Marko Kreen
* Missed adding extra argument to array_recv in a couple of placesTom Lane2005-07-102-6/+8
| | | | (harmless, actually, but let's be tidy).
* Change typreceive function API so that receive functions get the sameTom Lane2005-07-1018-144/+333
| | | | | | | optional arguments as text input functions, ie, typioparam OID and atttypmod. Make all the datatypes that use typmod enforce it the same way in typreceive as they do in typinput. This fixes a problem with failure to enforce length restrictions during COPY FROM BINARY.
* > One more failure:Bruce Momjian2005-07-101-3/+3
| | | | | | | | > > I think this is because we don't have -lz in SHLIB_LINK. > Following patch fixes it. Marko Kreen
* Add extra argument for new pg_regexec API.Bruce Momjian2005-07-101-1/+1
|
* Suppress compile warning.Tom Lane2005-07-101-2/+3
|
* Rename xmalloc to pg_malloc for consistency with psql usage.Bruce Momjian2005-07-103-25/+26
| | | | Add missing plperl include.
* Reverse pg_malloc patch because psql/print.c is used in scripts filesBruce Momjian2005-07-101-11/+62
| | | | that don't have pg_malloc.
* Use failure-safe pg_malloc consistently in psql/print.c.Bruce Momjian2005-07-101-62/+11
|
* Remove #include <openssl/bn.h> as compile fix.Bruce Momjian2005-07-101-3/+1
| | | | Marko Kreen
* Following up a previous thought I had, yesterday I realised how toBruce Momjian2005-07-101-6/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | return arays nicely without having to make the plperl programmer aware of anything. The attached patch allows plperl to return an arrayref where the function returns an array type. It silently calls a perl function to stringify the array before passing it to the pg array parser. Non-array returns are handled as before (i.e. passed through this process) so it is backwards compatible. I will presently submit regression tests and docs. example: andrew=# create or replace function blah() returns text[][] language plperl as $$ return [['a"b','c,d'],['e\\f','g']]; $$; CREATE FUNCTION andrew=# select blah(); blah ----------------------------- {{"a\"b","c,d"},{"e\\f",g}} This would complete half of the TODO item: . Pass arrays natively instead of as text between plperl and postgres (The other half is translating pg array arguments to perl arrays - that will have to wait for 8.1). Some of this patch is adapted from a previously submitted patch from Sergej Sergeev. Both he and Abhijit Menon-Sen have looked it over briefly and tentatively said it looks ok. Andrew Dunstan
* The attached patch implements spi_query() and spi_fetchrow() functionsBruce Momjian2005-07-105-1/+125
| | | | | | | | | | | | | | | | | for PL/Perl, to avoid loading the entire result set into memory as the existing spi_exec_query() function does. Here's how one might use the new functions: $x = spi_query("select ..."); while (defined ($y = spi_fetchrow($x))) { ... return_next(...); } The changes do not affect the spi_exec_query() interface in any way. Abhijit Menon-Sen
* Add --encoding to pg_dump.Bruce Momjian2005-07-102-3/+31
| | | | | | | | | | | | The Problem: Occassionally a DBA needs to dump a database to a new encoding. In instances where the current encoding, (or lack of an encoding, like SQL_ASCII) is poorly supported on the target database server, it can be useful to dump into a particular encoding. But, currently the only way to set the encoding of a pg_dump file is to change client_encoding in postgresql.conf and restart postmaster. This is more than a little awkward for production systems. Magnus Hagander