Commit Graph

20581 Commits

Author SHA1 Message Date
Peter Eisentraut 85884cb1de 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-03 18:54:28 +00:00
Tom Lane cc9bcbc8a4 Improve outer-join-deduction logic to be able to propagate equalities
through multiple join clauses.
2005-07-03 18:26:32 +00:00
Bruce Momjian 76eca0ec98 This patch allows contrib/pgcrypto to build with OpenSSL 0.9.8
(currently in beta) when cryptolib = openssl.  According to the
following checkin message from several years ago, OpenSSL application
developers should no longer rely on <openssl/evp.h> to include
everything they need:

http://cvs.openssl.org/chngview?cn=9888

This patch adds the necessary header files.  It doesn't appear to
break anything when building against OpenSSL 0.9.7.

BTW, core appears to build and work fine with OpenSSL 0.9.8.  I've
built 7.3 through HEAD against 0.9.8-beta6 without noticing any
problems.

Michael Fuhr
2005-07-03 02:32:56 +00:00
Bruce Momjian 16661d60ab > 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-02 23:28:22 +00:00
Tom Lane cc5e80b8d1 Teach planner about some cases where a restriction clause can be
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-02 23:00:42 +00:00
Bruce Momjian ea1e2b948d Remove GIST concurrency limitations section.
Christopher Kings-Lynne
2005-07-02 20:08:27 +00:00
Bruce Momjian 9caeace71c Add SGML markup for on/off values in run-time section. 2005-07-02 19:16:36 +00:00
Bruce Momjian 87e01d1eed Improve wrapping of long lines in postgresql.conf. 2005-07-02 18:46:45 +00:00
Bruce Momjian 6aa0fdc4aa Use on/off consistently for GUC variables in postgresql.conf and the
documentation, to match SHOW.
2005-07-02 18:29:04 +00:00
Bruce Momjian 74b49a8129 Add E'' to internally created SQL strings that contain backslashes.
Improve code clarity by using macros for E'' processing.
2005-07-02 17:01:59 +00:00
Bruce Momjian 654efe6aaa Update:
< * Add rtree index support for line, lseg, path, point
> * Add more gist index support for geometric data types
2005-07-02 14:30:38 +00:00
Neil Conway c425dcb4ec In PL/PgSQL, allow a block's label to be optionally specified at the
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-02 08:59:48 +00:00
Tom Lane 784b948984 Fix platform-dependency in recently added regression tests.
Per buildfarm results.
2005-07-01 23:18:01 +00:00
Bruce Momjian 539bc9fc91 Add code to pg_dump to use E'' strings when backslashes are used in dump
files.
2005-07-01 21:03:25 +00:00
Tom Lane 975368e267 Avoid function name conflict when plpgsql and rangefuncs regression tests
execute in parallel.  Spotted by Peter.
2005-07-01 20:29:02 +00:00
Tom Lane e6a8eba3f2 Remove contrib version of rtree_gist --- now in core system. 2005-07-01 19:23:07 +00:00
Tom Lane e7e1694295 Migrate rtree_gist functionality into the core system, and add some
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-01 19:19:05 +00:00
Peter Eisentraut 875efad481 Update to autoconf 2.59 as well as updates of related scripts 2005-07-01 18:17:31 +00:00
Bruce Momjian 2f7d369a5c Clarify code to double \\ and '. 2005-07-01 17:40:29 +00:00
Bruce Momjian f009248af1 Clarify:
< 	o Replace crude DELETE FROM method of pg_dumpall for cleaning of
< 	  roles with separate DROP commands
> 	o Replace crude DELETE FROM method of pg_dumpall --clean for
>           cleaning of roles with separate DROP commands
2005-07-01 17:35:22 +00:00
Bruce Momjian fee590c8b1 Update for roles:
< * Allow limits on per-db/user connections
> * Allow limits on per-db/role connections
< * Prevent default re-use of sysids for dropped users and roles
<
<   Currently, if a user is removed while he still owns objects, a new
<   user given might be given their user id and inherit the
<   previous users objects.
<
450c444
< * Add COMMENT ON for all cluster global objects (users, roles, databases
> * Add COMMENT ON for all cluster global objects (roles, databases
609c603
< 	  users and roles with separate DROP commands
> 	  roles with separate DROP commands
2005-07-01 17:32:21 +00:00
Bruce Momjian b00f557dd1 Update for roles:
< * Prevent default re-use of sysids for dropped users and groups
> * Prevent default re-use of sysids for dropped users and roles
450c450
< * Add COMMENT ON for all cluster global objects (users, groups, databases
> * Add COMMENT ON for all cluster global objects (users, roles, databases
609c609
< 	  users and groups with separate DROP commands
> 	  users and roles with separate DROP commands
2005-07-01 17:05:58 +00:00
Bruce Momjian 8ab306e4ea Item superceeded now that groups exist:
< * Add group object ownership, so groups can rename/drop/grant on objects,
<   so we can implement roles
2005-07-01 15:08:25 +00:00
Bruce Momjian 16d2699f7f Done:
> 	o -Add dumping and restoring of LOB comments
2005-07-01 14:51:49 +00:00
Teodor Sigaev ef770cbb69 Fixes from Janko Richter <jankorichter@yahoo.de>
- Fix wrong index results on text, char, varchar for multibyte strings
- Fix some SIGFPE signals
- Add support for infinite timestamps
- Because of locale settings, btree_gist can not be a prefix index anymore (for text).
  Each node holds now just the lower and upper boundary.
2005-07-01 13:44:56 +00:00
Bruce Momjian 8f6e8e8fed Clarify documentation about log_min_duration_statement. 2005-07-01 13:29:25 +00:00
Teodor Sigaev 5350216156 Improve error messages and add comment 2005-07-01 13:18:17 +00:00
Neil Conway 555f5139e0 Adds some missing error handling to PGTYPESnumeric_div() in ecpg's
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-01 05:13:58 +00:00
Neil Conway 9fad4cb604 Fix some minor infelicities in ecpg's pgtypeslib: (1) `pstr' must be
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-07-01 05:12:06 +00:00
Teodor Sigaev 898a7bd13b Bug fixes for GiST crash recovery.
- add forgotten check of lsn for insert completion
- remove level of pages: hard to check in recovery
- some cleanups
2005-06-30 17:52:14 +00:00
Peter Eisentraut 7a30b1fb96 Issue fatal error if no TCP/IP sockets could be created 2005-06-30 10:02:22 +00:00
Neil Conway 117fde2d17 Minor ecpg tweak: the return value of calloc() is guaranteed to be NULL
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-30 07:27:31 +00:00
Neil Conway 4802bb57a6 Warning cleanups for ecpg tests. Avoid doing pointer arithmetic on void *,
remove old-style function declarations, and mark a function "static".
There are some remaining warnings, but this fixes most of them, anyway.
2005-06-30 07:08:59 +00:00
Neil Conway 175c25a404 Fix ecpg's test/ Makefile for out-of-tree (vpath) builds. 2005-06-30 07:01:57 +00:00
Neil Conway dd4eea257b Fix build break on BSD, OSX, and other systems: add missing <sys/time.h>
include.
2005-06-30 03:48:58 +00:00
Tom Lane 51c58812d9 Dump comments for large objects. 2005-06-30 03:03:04 +00:00
Neil Conway 4714984149 Fix a theoretical memory leak in pg_password_sendauth(). If the first
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-30 01:59:20 +00:00
Tom Lane 401de9c8be Improve the checkpoint signaling mechanism so that the bgwriter can tell
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-30 00:00:52 +00:00
Tom Lane b5f7cff84f Clean up the rather historically encumbered interface to now() and
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-29 22:51:57 +00:00
Tom Lane c33d575899 More cleanup on roles patch. Allow admin option to be inherited through
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-29 20:34:15 +00:00
Teodor Sigaev 4523e0b63a Cleanup, remove unneeded pallocs 2005-06-29 14:06:14 +00:00
Bruce Momjian a29d815a7a Improve gettimeofday() documentation.
Karl O. Pinc
2005-06-29 01:52:56 +00:00
Bruce Momjian 0fc9b26098 Improved words spacing.
Victor Y. Yegorov
2005-06-29 01:23:49 +00:00
Bruce Momjian b3d06e5a95 Update typedefs for pgindent. 2005-06-28 23:55:30 +00:00
Bruce Momjian 249802725d Change awk ~ pattern from "" to //.
Remove extra backslash in pattern.  Luke Lonergan
2005-06-28 23:16:33 +00:00
Tom Lane 6561372c57 Fix up problems in write_auth_file and parsing of the auth file.
In particular, make hba.c cope with zero-length tokens, which it
never did properly before.  Also, enforce rolcanlogin.
2005-06-28 22:16:45 +00:00
Tom Lane 0eaa36a16a Bring syntax of role-related commands into SQL compliance. To avoid
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-28 19:51:26 +00:00
Teodor Sigaev 88b49cdc95 Code cleanup. gistfillbuffer accepts InvalidOffsetNumber. 2005-06-28 15:51:00 +00:00
Tom Lane 365205dd2a Fix broken initdb -W option, per Michael Fuhr. 2005-06-28 15:38:12 +00:00
Tom Lane 7762619e95 Replace pg_shadow and pg_group by new role-capable catalogs pg_authid
and pg_auth_members.  There are still many loose ends to finish in this
patch (no documentation, no regression tests, no pg_dump support for
instance).  But I'm going to commit it now anyway so that Alvaro can
make some progress on shared dependencies.  The catalog changes should
be pretty much done.
2005-06-28 05:09:14 +00:00