summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Reverse out because the lack of using pgport in timezone/ is causingBruce Momjian2005-07-062-15/+5
| | | | | | | | | | 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.
* Add pg_column_size() to return storage size of a column, includingBruce Momjian2005-07-065-5/+105
| | | | | | possible compression. Mark Kirkwood
* Sync dlopen error handling for the *BSDs ... seems to me I've done thisTom Lane2005-07-063-5/+6
| | | | before, but they were out of sync again. Per Kris Jurka.
* Add a check for trigger function with declared arguments. This pathTom Lane2005-07-061-1/+8
| | | | | | | 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.
* Save and restore errno across bindtextdomain call, per discussion.Tom Lane2005-07-061-4/+12
|
* Attached is a patch that enhances the "\h" capability in psql. I oftenBruce Momjian2005-07-061-38/+64
| | | | | | | | | | | | | 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
* Add GUC full_page_writes to control writing full pages to WAL.Bruce Momjian2005-07-053-3/+20
|
* Fix contrib/pgcrypto to autoconfigure for OpenSSL when --with-opensslTom Lane2005-07-051-1/+3
| | | | is used in the toplevel configure. Per Marko Kreen.
* Back out patch. This should be done like other server-side languages.Bruce Momjian2005-07-052-28/+1
| | | | | | | | | | | | | | | | | --------------------------------------------------------------------------- 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
* Add NO_PGPORT defines to fix win32/cygwin builds for new target platformBruce Momjian2005-07-051-4/+4
| | | | build of zic.
* Restructure zic #define fprintf checks to use a NO_PGPORT macro instead.Bruce Momjian2005-07-043-15/+5
|
* I have to admit that I got the case of the preprocessor symbol on amd64Bruce Momjian2005-07-042-4/+4
| | | | | | wrong. __AMD64__ is not defined, __amd64__ is. Christof Petig
* This patch allows the PL/Python module to do (SRF) functions.Bruce Momjian2005-07-042-1/+28
| | | | | | | | | | | | | 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
* I made the patch that improved the performance of replace_text().Bruce Momjian2005-07-041-18/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The content of the patch is as follows: (1)Create shortcut when subtext was not found. (2)Stop using LEFT and RIGHT macro. In LEFT and RIGHT macro, TEXTPOS is executed by the same content as execution immediately before. The execution frequency of TEXTPOS can be reduced by using text_substring instead of LEFT and RIGHT macro. (3)Add appendStringInfoText, and use it instead of appendStringInfoString. There is an overhead of PG_TEXT_GET_STR when appendStringInfoString is executed by text type. This can be reduced by appendStringInfoText. (4)Reduce execution of TEXTDUP. The effect of the patch that I measured is as follows: - The Data for test was created by 'pgbench -i'. - Test SQL: select replace(aid, '9', 'A') from accounts; - Test results: Linux(CPU: Pentium III, Compiler option: -O2) original: 1.515s patched: 1.250s Atsushi Ogawa
* Fix compile if zic because it now doesn't use libpgport.Bruce Momjian2005-07-041-1/+11
|
* Fix date_trunct for December dates that are in the next year, e.g.:Bruce Momjian2005-07-041-1/+7
| | | | | | | | SELECT date_trunc('week', '2002-12-31'::date); Backpatch to 8.0.X. Per report from Nick Johnson.
* Arrange for the postmaster (and standalone backends, initdb, etc) toTom Lane2005-07-0426-459/+352
| | | | | | | | chdir into PGDATA and subsequently use relative paths instead of absolute paths to access all files under PGDATA. This seems to give a small performance improvement, and it should make the system more robust against naive DBAs doing things like moving a database directory that has a live postmaster in it. Per recent discussion.
* Reverse this patch:Bruce Momjian2005-07-041-2/+2
| | | | | | | | | | | | | | | | | | --------------------------------------------------------------------------- > A quick look shows that when you use --with-libraries=/foo/bar the > generated link line for libraries says > > -L/foo/bar -lpq > > and it should probably be the other way around (as it is for the > executables). > > So I suspect we need some makefile tuning. You were correct. This patch fixes it. Jim C. Nasby
* Fix build break for out of tree (vpath) builds, induced by recent zicNeil Conway2005-07-041-2/+2
| | | | changes.
* Fix memory leak in plperl_hash_from_tuple(), per report from Jean-Max Reymond.Tom Lane2005-07-031-4/+6
|
* Don't try to constant-fold functions returning RECORD. We were neverTom Lane2005-07-032-38/+12
| | | | | | | | | | able to do this before, but I had tried to make an exception for functions with OUT parameters. Michael Fuhr found one problem with it already, and I found another, which was it didn't work for strict functions with a NULL input. While both of these could be worked around, the probability that there are more gotchas seems high; I think prudence dictates just reverting to the former behavior for now. Accordingly, remove the kluge added to get_expr_result_type() for Michael's case.
* Support cross compilation by compiling "zic" with a native compiler. ThisPeter Eisentraut2005-07-032-5/+15
| | | | | relies on the output of zic being platform independent, but that is currently the case.
* Improve outer-join-deduction logic to be able to propagate equalitiesTom Lane2005-07-031-157/+202
| | | | through multiple join clauses.
* > A quick look shows that when you use --with-libraries=/foo/bar theBruce Momjian2005-07-021-2/+2
| | | | | | | | | | | | | | | > generated link line for libraries says > > -L/foo/bar -lpq > > and it should probably be the other way around (as it is for the > executables). > > So I suspect we need some makefile tuning. You were correct. This patch fixes it. Jim C. Nasby
* Teach planner about some cases where a restriction clause can beTom Lane2005-07-0213-114/+424
| | | | | | | | | | | | | | | propagated inside an outer join. In particular, given LEFT JOIN ON (A = B) WHERE A = constant, we cannot conclude that B = constant at the top level (B might be null instead), but we can nonetheless put a restriction B = constant into the quals for B's relation, since no inner-side rows not meeting that condition can contribute to the final result. Similarly, given FULL JOIN USING (J) WHERE J = constant, we can't directly conclude that either input J variable = constant, but it's OK to push such quals into each input rel. Per recent gripe from Kim Bisgaard. Along the way, remove 'valid_everywhere' flag from RestrictInfo, as on closer analysis it was not being used for anything, and was defined backwards anyway.
* Improve wrapping of long lines in postgresql.conf.Bruce Momjian2005-07-021-15/+17
|
* Use on/off consistently for GUC variables in postgresql.conf and theBruce Momjian2005-07-021-59/+60
| | | | documentation, to match SHOW.
* Add E'' to internally created SQL strings that contain backslashes.Bruce Momjian2005-07-0212-89/+91
| | | | Improve code clarity by using macros for E'' processing.
* In PL/PgSQL, allow a block's label to be optionally specified at theNeil Conway2005-07-023-36/+179
| | | | | | | | | | | | | end of the block: <<label>> begin ... end label; Similarly for loops. This is per PL/SQL. Update the documentation and add regression tests. Patch from Pavel Stehule, code review by Neil Conway.
* Fix platform-dependency in recently added regression tests.Tom Lane2005-07-012-18/+18
| | | | Per buildfarm results.
* Add code to pg_dump to use E'' strings when backslashes are used in dumpBruce Momjian2005-07-013-11/+41
| | | | files.
* Avoid function name conflict when plpgsql and rangefuncs regression testsTom Lane2005-07-012-8/+8
| | | | execute in parallel. Spotted by Peter.
* Migrate rtree_gist functionality into the core system, and add someTom Lane2005-07-0116-24/+1406
| | | | | | | basic regression tests for GiST to the standard regression tests. I took the opportunity to add an rtree-equivalent gist opclass for circles; the contrib version only covered boxes and polygons, but indexing circles is very handy for distance searches.
* Update to autoconf 2.59 as well as updates of related scriptsPeter Eisentraut2005-07-011-9/+0
|
* Clarify code to double \\ and '.Bruce Momjian2005-07-014-11/+9
|
* Clarify documentation about log_min_duration_statement.Bruce Momjian2005-07-011-1/+2
|
* Improve error messages and add commentTeodor Sigaev2005-07-011-5/+14
|
* Adds some missing error handling to PGTYPESnumeric_div() in ecpg'sNeil Conway2005-07-011-7/+29
| | | | | | | pgtypeslib: (1) we need to check the return value of sub_abs() (2) we need to check the return value of 4 calls to digitbuf_alloc(). Per Coverity static analysis performed by EnterpriseDB.
* Fix some minor infelicities in ecpg's pgtypeslib: (1) `pstr' must beNeil Conway2005-07-011-4/+5
| | | | | | | non-NULL in this function, so there is no need to check for it (2) we should check the return value of pgtypes_strdup(). Patch from Eric Astor at EnterpriseDB, with slight cleanup by myself, per a report from the Coverity tool.
* Bug fixes for GiST crash recovery.Teodor Sigaev2005-06-306-65/+95
| | | | | | - add forgotten check of lsn for insert completion - remove level of pages: hard to check in recovery - some cleanups
* Issue fatal error if no TCP/IP sockets could be createdPeter Eisentraut2005-06-301-2/+9
|
* Minor ecpg tweak: the return value of calloc() is guaranteed to be NULLNeil Conway2005-06-301-5/+1
| | | | | | or zero-filled; therefore zero-filling it via memset() is pointless. (I think setting `errno' is probably a waste of cycles as well, but I haven't changed that.)
* Warning cleanups for ecpg tests. Avoid doing pointer arithmetic on void *,Neil Conway2005-06-3016-21/+21
| | | | | remove old-style function declarations, and mark a function "static". There are some remaining warnings, but this fixes most of them, anyway.
* Fix ecpg's test/ Makefile for out-of-tree (vpath) builds.Neil Conway2005-06-301-5/+5
|
* Fix build break on BSD, OSX, and other systems: add missing <sys/time.h>Neil Conway2005-06-301-1/+2
| | | | include.
* Dump comments for large objects.Tom Lane2005-06-303-35/+162
|
* Fix a theoretical memory leak in pg_password_sendauth(). If the firstNeil Conway2005-06-301-6/+6
| | | | | | | | malloc() succeeded but the second failed, the buffer allocated by the first malloc() would be leaked. Fix this by allocating both buffers via a single malloc(), as suggested by Tom. Per Coverity static analysis performed by EnterpriseDB.
* Improve the checkpoint signaling mechanism so that the bgwriter can tellTom Lane2005-06-306-29/+45
| | | | | | | | the difference between checkpoints forced due to WAL segment consumption and checkpoints forced for other reasons (such as CREATE DATABASE). Avoid generating 'checkpoints are occurring too frequently' messages when the checkpoint wasn't caused by WAL segment consumption. Per gripe from Chris K-L.
* Clean up the rather historically encumbered interface to now() andTom Lane2005-06-2917-213/+130
| | | | | | | | current time: provide a GetCurrentTimestamp() function that returns current time in the form of a TimestampTz, instead of separate time_t and microseconds fields. This is what all the callers really want anyway, and it eliminates low-level dependencies on AbsoluteTime, which is a deprecated datatype that will have to disappear eventually.
* More cleanup on roles patch. Allow admin option to be inherited throughTom Lane2005-06-297-311/+534
| | | | | | role memberships; make superuser/createrole distinction do something useful; fix some locking and CommandCounterIncrement issues; prevent creation of loops in the membership graph.