summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2005-07-14barebones variable name -> tuples_only, for consistency.Bruce Momjian
2005-07-14Fix malloc length for new numeric separator patch.Bruce Momjian
Centralize malloc into function.
2005-07-14Integrate autovacuum functionality into the backend. There's still aTom Lane
few loose ends to be dealt with, but it seems to work. Alvaro Herrera, based on the contrib code by Matthew O'Connor.
2005-07-13Fix a couple of bogus comments, per Alvaro.Tom Lane
2005-07-13Remove extraneous space after -L ... it confuses SHLIB_LINK filter -LTom Lane
hack.
2005-07-13Fix unwanted side-effects of recent SHLIB_LINK -L patch on existingTom Lane
hacking of SHLIB_LINK for HPUX.
2005-07-13Fix #elif spacing too.Bruce Momjian
2005-07-13Fix libpq memory leak during PQreset() --- closePGconn() was notTom Lane
freeing all transient state of the PGconn object.
2005-07-13Fix pgindent to not have blank line before #else in variable definitionBruce Momjian
section of a function.
2005-07-13Add backslashes to parentheses in awk regex because if not, they areBruce Momjian
treated as regex groups.
2005-07-13Move -L flag around for shared builds:Bruce Momjian
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.
2005-07-12Hack around the discrepancy between default library search paths forTom Lane
gcc and for HP's ld on HPUX. There may be better ways to do this, but this seems to work for me...
2005-07-12Fix plperl crash with list value return for an array result type.Tom Lane
Reported by Michael Fuhr, fixed by Andrew Dunstan.
2005-07-12Improve comments for AdjustIntervalForTypmod.Bruce Momjian
Blank line adjustments.
2005-07-12Change 5e0 to 5.0, for consistency.Bruce Momjian
2005-07-12Fix plperl to do recursion safely, and fix a problem with array results.Tom Lane
Add suitable regression tests. Andrew Dunstan
2005-07-10Missed adding extra argument to array_recv in a couple of placesTom Lane
(harmless, actually, but let's be tidy).
2005-07-10Change typreceive function API so that receive functions get the sameTom Lane
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.
2005-07-10Rename xmalloc to pg_malloc for consistency with psql usage.Bruce Momjian
Add missing plperl include.
2005-07-10Reverse pg_malloc patch because psql/print.c is used in scripts filesBruce Momjian
that don't have pg_malloc.
2005-07-10Use failure-safe pg_malloc consistently in psql/print.c.Bruce Momjian
2005-07-10Following up a previous thought I had, yesterday I realised how toBruce Momjian
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
2005-07-10The attached patch implements spi_query() and spi_fetchrow() functionsBruce Momjian
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
2005-07-10Add --encoding to pg_dump.Bruce Momjian
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
2005-07-10This patch implements putting language handlers for the optional PLsBruce Momjian
into pg_catalog rather than public, and supports dumping languages whose handlers are found there. This will make it easier to drop the public schema if desired. Unlike the previous patch, the comments have been updated and I have reformatted some code to meet Alvarro's request to stick to 80 cols. (I actually aghree with this - it makes printing the code much nicer). I think I did the right thing w.r.t versions earlier than 7.3, but I have no real way of checking, so that should be checked by someone with more/older knowledge than me ;-) Andrew Dunstan
2005-07-10This patch addresses the problem mentioned in the "process crashBruce Momjian
when a plpython function returns unicode" thread: http://archives.postgresql.org/pgsql-bugs/2005-06/msg00105.php In several places PL/Python was calling PyObject_Str() and then PyString_AsString() without checking if the former had returned NULL to indicate an error. PyString_AsString() doesn't expect a NULL argument, so passing one causes a segmentation fault. This patch adds checks for NULL and raises errors via PLy_elog(), which prints details of the underlying Python exception. The patch also adds regression tests for these checks. All tests pass on my Solaris 9 box running HEAD and Python 2.4.1. In one place the patch doesn't call PLy_elog() because that could cause infinite recursion; see the comment I added. I'm not sure how to test that particular case or whether it's even possible to get an error there: the value that the code should check is the Python exception type, so I wonder if a NULL value "shouldn't happen." This patch converts NULL to "Unknown Exception" but I wonder if an Assert() would be appropriate. The patch is against HEAD but the same changes should be applied to earlier versions because they have the same problem. The patch might not apply cleanly against earlier versions -- will the committer take care of little differences or should I submit different versions of the patch? Michael Fuhr
2005-07-10I made the patch that implements regexp_replace again.Bruce Momjian
The specification of this function is as follows. regexp_replace(source text, pattern text, replacement text, [flags text]) returns text Replace string that matches to regular expression in source text to replacement text. - pattern is regular expression pattern. - replacement is replace string that can use '\1'-'\9', and '\&'. '\1'-'\9': back reference to the n'th subexpression. '\&' : entire matched string. - flags can use the following values: g: global (replace all) i: ignore case When the flags is not specified, case sensitive, replace the first instance only. Atsushi Ogawa
2005-07-10Add psql \pset numericsep to allow output numbers like 100,000.0 orBruce Momjian
100.000,0. Eugen Nedelcu
2005-07-08Fix config file lexer to not barf if postgresql.conf ends with a commentTom Lane
that has no terminating newline. Per report from maps.on at gmx.net.
2005-07-08Try connecting to both postgres and template1 databases to do the initialTom Lane
inspection of shared catalogs. This allows pg_dumpall to continue to work with pre-8.1 servers that likely won't have a database named postgres. Also, suppress output of SYSID options for users and groups, since server no longer does anything with these except emit a rude message. There is much more to be done to update pg_dumpall for the roles feature, but this at least makes it usable again. Per gripe from Chris K-L.
2005-07-08Make libpq_gettext save and restore errno in a Windows-compatible way.Tom Lane
Also, back-patch fix into back branches.
2005-07-08testing activitymailPostgreSQL Daemon
2005-07-08Remove some dead code for handling XLOG_DBASE_CREATE_OLD andNeil Conway
XLOG_DBASE_DROP_OLD WAL records -- these records are no longer created in current sources. Adjust numbering of XLOG_DBASE_CREATE and XLOG_DBASE_DROP and bump the catversion. Patch from Gavin Sherry, adjusted by Neil Conway.
2005-07-08Even though I'd like to see full_page_writes go away before 8.1,Tom Lane
a minimum requirement is that it not completely break the system meanwhile. Put the test in the right place.
2005-07-07Track dependencies on shared objects (which is to say, roles; we alreadyTom Lane
have adequate mechanisms for tracking the contents of databases and tablespaces). This solves the longstanding problem that you can drop a user who still owns objects and/or has access permissions. Alvaro Herrera, with some kibitzing from Tom Lane.
2005-07-07Fix plperl expected output.Bruce Momjian
Andrew Dunstan
2005-07-07pg_column_size() cleanup for messages and code cleanup.Bruce Momjian
Mark Kirkwood
2005-07-06Currently, nonfatal warnings are not trapped (as they should be) byBruce Momjian
plperl - the attached small patch remedies that omission, and adds a small regression test for error and warning output - the new regression input and expected output are in separate attached files. Andrew Dunstan
2005-07-06Currently, nonfatal warnings are not trapped (as they should be) byBruce Momjian
plperl - the attached small patch remedies that omission. Andrew Dunstan
2005-07-06Complete zic patch backout by removing NO_PGPORT workaround.Bruce Momjian
2005-07-06Reverse out because the lack of using pgport in timezone/ is causingBruce Momjian
problems: --------------------------------------------------------------------------- Support cross compilation by compiling "zic" with a native compiler. This relies on the output of zic being platform independent, but that is currently the case.
2005-07-06Add pg_column_size() to return storage size of a column, includingBruce Momjian
possible compression. Mark Kirkwood
2005-07-06Sync dlopen error handling for the *BSDs ... seems to me I've done thisTom Lane
before, but they were out of sync again. Per Kris Jurka.
2005-07-06Add a check for trigger function with declared arguments. This pathTom Lane
could not be reached before, but now that there is a plpgsql validator function, it can be. Check is needed to prevent core dump reported by Satoshi Nagayasu. Besides, this gives a more specific and useful error message for a fairly common novice error.
2005-07-06Save and restore errno across bindtextdomain call, per discussion.Tom Lane
2005-07-06Attached is a patch that enhances the "\h" capability in psql. I oftenBruce Momjian
find myself typing a command and then wanting to get the syntax for it. So I do a ctrl-a and add a \h: but psql does not recognize the command, because I have stuff attached to it (e.g. "alter table foobar"), so I have to scroll over and delete everything except the name of the command itself. This patch gives \h three chances to match: if nothing matches the complete string (current behavior), it tries to match the first two words (e.g. "ALTER TABLE"). If that fails, it tries to match the first word (e.g. "DELETE"). Greg Sabino Mullane
2005-07-05Add GUC full_page_writes to control writing full pages to WAL.Bruce Momjian
2005-07-05Fix contrib/pgcrypto to autoconfigure for OpenSSL when --with-opensslTom Lane
is used in the toplevel configure. Per Marko Kreen.
2005-07-05Back out patch. This should be done like other server-side languages.Bruce Momjian
--------------------------------------------------------------------------- This patch allows the PL/Python module to do (SRF) functions. The patch was taken from the CVS version. I have modified the plpython.c file and have added a test sql script for testing the functionality. It was actually the script that was in the 8.0.3 version but have since been removed. In order to signal the end of a set, the called python function must simply return plpy.EndOfSet and the set would be returned. Gerrit van Dyk
2005-07-05Add NO_PGPORT defines to fix win32/cygwin builds for new target platformBruce Momjian
build of zic.