summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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.
2005-07-04Restructure zic #define fprintf checks to use a NO_PGPORT macro instead.Bruce Momjian
2005-07-04I have to admit that I got the case of the preprocessor symbol on amd64Bruce Momjian
wrong. __AMD64__ is not defined, __amd64__ is. Christof Petig
2005-07-04This patch allows the PL/Python module to do (SRF) functions.Bruce Momjian
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-04I made the patch that improved the performance of replace_text().Bruce Momjian
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
2005-07-04Fix compile if zic because it now doesn't use libpgport.Bruce Momjian
2005-07-04Fix date_trunct for December dates that are in the next year, e.g.:Bruce Momjian
SELECT date_trunc('week', '2002-12-31'::date); Backpatch to 8.0.X. Per report from Nick Johnson.
2005-07-04Arrange for the postmaster (and standalone backends, initdb, etc) toTom Lane
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.
2005-07-04Reverse this patch:Bruce Momjian
--------------------------------------------------------------------------- > 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
2005-07-04Fix build break for out of tree (vpath) builds, induced by recent zicNeil Conway
changes.
2005-07-03Fix memory leak in plperl_hash_from_tuple(), per report from Jean-Max Reymond.Tom Lane
2005-07-03Don't try to constant-fold functions returning RECORD. We were neverTom Lane
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.
2005-07-03Support cross compilation by compiling "zic" with a native compiler. ThisPeter Eisentraut
relies on the output of zic being platform independent, but that is currently the case.
2005-07-03Improve outer-join-deduction logic to be able to propagate equalitiesTom Lane
through multiple join clauses.
2005-07-02> A quick look shows that when you use --with-libraries=/foo/bar theBruce Momjian
> 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
2005-07-02Teach planner about some cases where a restriction clause can beTom Lane
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.
2005-07-02Improve wrapping of long lines in postgresql.conf.Bruce Momjian
2005-07-02Use on/off consistently for GUC variables in postgresql.conf and theBruce Momjian
documentation, to match SHOW.
2005-07-02Add E'' to internally created SQL strings that contain backslashes.Bruce Momjian
Improve code clarity by using macros for E'' processing.
2005-07-02In PL/PgSQL, allow a block's label to be optionally specified at theNeil Conway
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.
2005-07-01Fix platform-dependency in recently added regression tests.Tom Lane
Per buildfarm results.
2005-07-01Add code to pg_dump to use E'' strings when backslashes are used in dumpBruce Momjian
files.
2005-07-01Avoid function name conflict when plpgsql and rangefuncs regression testsTom Lane
execute in parallel. Spotted by Peter.
2005-07-01Migrate rtree_gist functionality into the core system, and add someTom Lane
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.
2005-07-01Update to autoconf 2.59 as well as updates of related scriptsPeter Eisentraut
2005-07-01Clarify code to double \\ and '.Bruce Momjian
2005-07-01Clarify documentation about log_min_duration_statement.Bruce Momjian
2005-07-01Improve error messages and add commentTeodor Sigaev
2005-07-01Adds some missing error handling to PGTYPESnumeric_div() in ecpg'sNeil Conway
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.
2005-07-01Fix some minor infelicities in ecpg's pgtypeslib: (1) `pstr' must beNeil Conway
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.
2005-06-30Bug fixes for GiST crash recovery.Teodor Sigaev
- add forgotten check of lsn for insert completion - remove level of pages: hard to check in recovery - some cleanups
2005-06-30Issue fatal error if no TCP/IP sockets could be createdPeter Eisentraut
2005-06-30Minor ecpg tweak: the return value of calloc() is guaranteed to be NULLNeil Conway
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.)
2005-06-30Warning cleanups for ecpg tests. Avoid doing pointer arithmetic on void *,Neil Conway
remove old-style function declarations, and mark a function "static". There are some remaining warnings, but this fixes most of them, anyway.
2005-06-30Fix ecpg's test/ Makefile for out-of-tree (vpath) builds.Neil Conway
2005-06-30Fix build break on BSD, OSX, and other systems: add missing <sys/time.h>Neil Conway
include.
2005-06-30Dump comments for large objects.Tom Lane
2005-06-30Fix a theoretical memory leak in pg_password_sendauth(). If the firstNeil Conway
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.
2005-06-30Improve the checkpoint signaling mechanism so that the bgwriter can tellTom Lane
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.
2005-06-29Clean up the rather historically encumbered interface to now() andTom Lane
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.
2005-06-29More cleanup on roles patch. Allow admin option to be inherited throughTom Lane
role memberships; make superuser/createrole distinction do something useful; fix some locking and CommandCounterIncrement issues; prevent creation of loops in the membership graph.
2005-06-29Cleanup, remove unneeded pallocsTeodor Sigaev
2005-06-28Update typedefs for pgindent.Bruce Momjian
2005-06-28Change awk ~ pattern from "" to //.Bruce Momjian
Remove extra backslash in pattern. Luke Lonergan
2005-06-28Fix up problems in write_auth_file and parsing of the auth file.Tom Lane
In particular, make hba.c cope with zero-length tokens, which it never did properly before. Also, enforce rolcanlogin.
2005-06-28Bring syntax of role-related commands into SQL compliance. To avoidTom Lane
syntactic conflicts, both privilege and role GRANT/REVOKE commands have to use the same production for scanning the list of tokens that might eventually turn out to be privileges or role names. So, change the existing GRANT/REVOKE code to expect a list of strings not pre-reduced AclMode values. Fix a couple other minor issues while at it, such as InitializeAcl function name conflicting with a Windows system function.
2005-06-28Code cleanup. gistfillbuffer accepts InvalidOffsetNumber.Teodor Sigaev