Commit Graph

20563 Commits

Author SHA1 Message Date
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
Bruce Momjian 977530d8da Done:
> * -Add concurrency to GIST
2005-06-27 23:21:58 +00:00
Teodor Sigaev e8cab5fe49 Concurrency for GiST
- full concurrency for insert/update/select/vacuum:
        - select and vacuum never locks more than one page simultaneously
        - select (gettuple) hasn't any lock across it's calls
        - insert never locks more than two page simultaneously:
                - during search of leaf to insert it locks only one page
                  simultaneously
                - while walk upward to the root it locked only parent (may be
                  non-direct parent) and child. One of them X-lock, another may
                  be S- or X-lock
- 'vacuum full' locks index
- improve gistgetmulti
- simplify XLOG records

Fix bug in index_beginscan_internal: LockRelation may clean
  rd_aminfo structure, so move GET_REL_PROCEDURE after LockRelation
2005-06-27 12:45:23 +00:00
Tom Lane c3be085ab7 Modify pg_dump to assume that a check constraint is inherited if its
name matches the name of any parent-table constraint, without looking
at the constraint text.  This is a not-very-bulletproof workaround for
the problem exhibited by Berend Tober last month.  We really ought to
record constraint inheritance status in pg_constraint, but it's looking
like that may not get done for 8.1 --- and even if it does, we will
need this kluge for dumping from older servers.
2005-06-27 02:17:47 +00:00
Bruce Momjian fc722403a6 Done:
> * -Remove kerberos4 from source tree
2005-06-27 02:17:20 +00:00
Neil Conway a159ad3048 Remove support for Kerberos V4. It seems no one is using this, it has
some security issues, and upstream has declared it "dead". Patch from
Magnus Hagander, minor editorialization from Neil Conway.
2005-06-27 02:04:26 +00:00
Bruce Momjian a051da0207 Done:
> 	o -Allow PL/pgSQL EXECUTE query_var INTO record_var;
2005-06-27 01:53:52 +00:00
Tom Lane dcf2e1c8c7 Remove the << >> &< and &> operators for contrib/cube, which were
wrong, but nobody noticed because they were also useless.
2005-06-27 01:19:43 +00:00
Tom Lane 54c80a3434 Adjust contrib/seg &< and &> operators so that r-tree indexing logic
works properly for 1-D comparisons.  Fix some other errors such as
bogus commutator specifications.
2005-06-27 00:48:07 +00:00
Tom Lane 06ae88a82e Tweak dynahash.c to not allocate so many entries at once when dealing
with a table that has a small predicted size.  Avoids wasting several
hundred K on the timezone hash table, which is likely to have only one
or a few entries, but the entries use up 10Kb apiece ...
2005-06-26 23:32:34 +00:00
Tom Lane 943b396245 Add Oracle-compatible GREATEST and LEAST functions. Pavel Stehule 2005-06-26 22:05:42 +00:00
Tom Lane d395aecffa Code review for escape-strings patch. Sync psql and plpgsql lexers
with main, avoid using a SQL-defined SQLSTATE for what is most definitely
not a SQL-compatible error condition, fix documentation omissions,
adhere to message style guidelines, don't use two GUC_REPORT variables
when one is sufficient.  Nothing done about pg_dump issues.
2005-06-26 19:16:07 +00:00
Tom Lane 3cbd6bc308 Fix overlooked regression output file. 2005-06-26 17:20:04 +00:00
Bruce Momjian bb3cce4ec9 Add E'' syntax so eventually normal strings can treat backslashes
literally.

Add GUC variables:

        "escape_string_warning" - warn about backslashes in non-E strings
        "escape_string_syntax" - supports E'' syntax?
        "standard_compliant_strings" - treats backslashes literally in ''

Update code to use E'' when escapes are used.
2005-06-26 03:04:37 +00:00
Tom Lane c96375a39b Fix a couple of items that should be declared Oid not int. Purely
cosmetic at the moment, but someday Oid might be 64 bits ...
2005-06-25 23:58:58 +00:00
Tom Lane ca1d4eb7f8 Remove forced CHECKPOINT in regression tests --- redundant now that
CREATE DATABASE does one internally.
2005-06-25 23:04:06 +00:00
Tom Lane fbcbc5d06f Force a checkpoint before committing a CREATE DATABASE command. This
should fix the recent reports of "index is not a btree" failures,
as well as preventing a more obscure race condition involving changes
to a template database just after copying it with CREATE DATABASE.
2005-06-25 22:47:29 +00:00
Tom Lane 3acca18d28 Fix ancient memory leak in index_create(): RelationInitIndexAccessInfo
was being called twice in normal operation, leading to a leak of one set
of relcache subsidiary info.  Per report from Jeff Gold.
2005-06-25 16:53:49 +00:00
Bruce Momjian 252600fade Add:
> 	o Pass arrays natively instead of as text between plperl and postgres
> 	o Add support for polymorphic arguments and return types to plperl
2005-06-25 15:24:11 +00:00