Commit Graph

6623 Commits

Author SHA1 Message Date
Tom Lane 3fdeb189e9 Clean up code associated with updating pg_class statistics columns
(relpages/reltuples).  To do this, create formal support in heapam.c for
"overwrite" tuple updates (including xlog replay capability) and use that
instead of the ad-hoc overwrites we'd been using in VACUUM and CREATE INDEX.
Take the responsibility for updating stats during CREATE INDEX out of the
individual index AMs, and do it where it belongs, in catalog/index.c.  Aside
from being more modular, this avoids having to update the same tuple twice in
some paths through CREATE INDEX.  It's probably not measurably faster, but
for sure it's a lot cleaner than before.
2006-05-10 23:18:39 +00:00
Bruce Momjian 12049d343e Revert documentation mention of array dimension checking, in next paragraph. 2006-05-09 23:12:54 +00:00
Bruce Momjian 0c9fab6c3b Mention array dimmensions are not enforced either. 2006-05-09 16:31:23 +00:00
Bruce Momjian 5ff2838c57 Add description:
* %Disallow changing DEFAULT expression of a SERIAL column?

>
>   This should be done only if the existing SERIAL problems cannot be
>   fixed.
>
2006-05-06 23:35:32 +00:00
Bruce Momjian d9d2d91544 Recommend more clearly custom pg_dump format over tar, buy showing
custom format examples first.
2006-05-06 23:25:37 +00:00
Bruce Momjian bcf860b7f3 Document SSL CRL usage by libpq. 2006-05-06 16:25:11 +00:00
Bruce Momjian ee1b63a48b Update standards URL.
Robert Treat
2006-05-05 09:51:53 +00:00
Bruce Momjian 9bd5181068 Add/ cleanup:
< * %Disallow changing default expression of a SERIAL column?
> * %Disallow changing DEFAULT expression of a SERIAL column?
472a473,476
> * Add DEFAULT .. AS OWNER so permission checks are done as the table
>   owner
>
>   This would be useful for SERIAL nextval() calls and CHECK constraints.
2006-05-05 09:35:58 +00:00
Tom Lane 52667d56a3 Rethink the locking mechanisms used for CREATE/DROP/RENAME DATABASE.
The former approach used ExclusiveLock on pg_database, which being a
cluster-wide lock meant only one of these operations could proceed at
a time; worse, it also blocked all incoming connections in ReverifyMyDatabase.
Now that we have LockSharedObject(), we can use locks of different types
applied to databases considered as objects.  This allows much more
flexible management of the interlocking: two CREATE DATABASEs need not
block each other, and need not block connections except to the template
database being used.  Similarly DROP DATABASE doesn't block unrelated
operations.  The locking used in flatfiles.c is also much narrower in
scope than before.  Per recent proposal.
2006-05-04 16:07:29 +00:00
Tom Lane e57345975c Clean up API for ambulkdelete/amvacuumcleanup as per today's discussion.
This formulation requires every AM to provide amvacuumcleanup, unlike before,
but it's surely a whole lot cleaner.  Also, add an 'amstorage' column to
pg_am so that we can get rid of hardwired knowledge in DefineOpClass().
2006-05-02 22:25:10 +00:00
Tom Lane d3171dd64b Fix broken markup. 2006-05-02 18:07:51 +00:00
Tom Lane 82a2881c5b Code review for GRANT CONNECT patch. Spell the privilege as CONNECT not
CONNECTION, fix a number of places that were missed (eg pg_dump support),
avoid executing an extra search of pg_database during startup.
2006-04-30 21:15:33 +00:00
Tom Lane 986085a7f0 Improve the representation of FOR UPDATE/FOR SHARE so that we can
support both FOR UPDATE and FOR SHARE in one command, as well as both
NOWAIT and normal WAIT behavior.  The more general code is actually
simpler and cleaner.
2006-04-30 18:30:40 +00:00
Bruce Momjian 931bfc9664 Done:
> 	o -Allow per-database permissions to be set via GRANT
2006-04-30 02:10:41 +00:00
Bruce Momjian 4899aaf2d5 Add GRANT CONNECTION ON DATABASE, to be used in addition to pg_hba.conf.
Gevik Babakhani
2006-04-30 02:09:07 +00:00
Bruce Momjian 87db3ad078 Add question mark:
> * %Disallow changing default expression of a SERIAL column?
2006-04-30 01:45:26 +00:00
Bruce Momjian 782df58a1c Revert patch pending more discussion:
Disallow changing DEFAULT expression of a SERIAL column.
2006-04-30 01:08:07 +00:00
Bruce Momjian c6ef426f67 Done:
> * -Disallow changing default expression of a SERIAL column
2006-04-29 16:44:31 +00:00
Bruce Momjian 87f00a4694 Add to item log_min_error_messages item:
>   Another idea is to allow separate configuration files for each module,
>   or allow arbitrary SET commands to be passed to them.
2006-04-27 15:56:17 +00:00
Bruce Momjian 80aa37a72f Add:
> * Invalidate prepared queries, like INSERT, when the table definition
>   is altered
2006-04-27 02:41:36 +00:00
Bruce Momjian e747f4935a Add support for SSL Certificate Revocation List (CRL) files, root.crl.
Libor Hoho?
2006-04-27 02:29:14 +00:00
Bruce Momjian 02eb8f4f5c Use schema search path to find the first matching contraint name for SET
CONSTRAINT, rather than affecting all constraints in all schemas (which
is what we used to do).  Also allow schema specifications.

Kris Jurka
2006-04-27 00:33:46 +00:00
Bruce Momjian 0df32e3cbe Allow pg_resetxlog -f to reset pg_control counters using xlog
information, and add a -r option to reset pg_control without affecting
xlog.

yuanjia lee
2006-04-26 02:17:15 +00:00
Bruce Momjian 3289a932a9 Done:
* -Allow WAL information to recover corrupted pg_controldata
2006-04-26 02:15:20 +00:00
Bruce Momjian 89083876c9 Adjust SGML spacing. 2006-04-25 21:02:33 +00:00
Tom Lane 7e2d5594d7 Back out the rest of the RESET CONNECTION patch. 2006-04-25 18:58:37 +00:00
Bruce Momjian ff49a020ca Remove equals sign from environment variable with not defaults for
configure.
2006-04-25 15:19:16 +00:00
Bruce Momjian 1bd8f4f54f Make configure environment variable options without defaults not have an
equals sign.
2006-04-25 15:17:04 +00:00
Bruce Momjian 67248f7290 Add documentation about configure environment variabbles used.
David Wheeler
2006-04-25 15:14:16 +00:00
Bruce Momjian 706cbfd632 Call SET varaiables "configuration_parameter"s in the documentation. 2006-04-25 14:56:04 +00:00
Bruce Momjian e72fd16fa8 Change "parameter" to "varname" in the alter role and alter user
documentation sections.  Also update SET/RESET to be consistent.

Nicolas Barbier
2006-04-25 14:47:29 +00:00
Bruce Momjian 5fd7df43e2 I now see we support RESET SESSION AUTHORIZATION, so it seems we have to
use RESET CONNECTION:

< * Add RESET SESSION command to reset all session state
> * Add RESET CONNECTION command to reset all session state
447c447
<   notify the protocol when a RESET SESSION command is used.
>   notify the protocol when a RESET CONNECTION command is used.
2006-04-25 14:33:41 +00:00
Bruce Momjian 2b70093548 RESET SESSION is more precise:
< * Add RESET CONNECTION command to reset all session state
> * Add RESET SESSION command to reset all session state
447c447
<   notify the protocol when a RESET CONNECTION command is used.
>   notify the protocol when a RESET SESSION command is used.
2006-04-25 14:31:03 +00:00
Bruce Momjian 59d591e79a Back out RESET CONNECTION until there is more discussion. 2006-04-25 14:11:59 +00:00
Bruce Momjian 6378fdd971 Add RESET CONNECTION, to reset all aspects of a session.
Hans-J?rgen Sch?nig
2006-04-25 14:09:21 +00:00
Bruce Momjian 11fbdf2f25 Update inheritance constraint items:
< 	o %Prevent child tables from altering or dropping constraints
<           like CHECK that were inherited from the parent table
< 	  like CHECK that are inherited by child tables
<
< 	  Dropping constraints should only be possible with CASCADE.
<
> 	  like CHECK that are inherited by child tables unless CASCADE
> 	  is used
> 	o %Prevent child tables from altering or dropping constraints
>           like CHECK that were inherited from the parent table
2006-04-25 02:58:34 +00:00
Bruce Momjian b532c86f2e Done:
> * -Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
2006-04-25 00:26:53 +00:00
Bruce Momjian e6004f0151 Add statement_timestamp(), clock_timestamp(), and
transaction_timestamp() (just like now()).

Also update statement_timeout() to mention it is statement arrival time
that is measured.

Catalog version updated.
2006-04-25 00:25:22 +00:00
Bruce Momjian f04080d73b Word wrap entry 2006-04-25 00:06:23 +00:00
Bruce Momjian c880f9aeb2 Update SQL-standard INTERVAL item:
o Support ISO INTERVAL syntax if units cannot be determined from
          the string, and are supplied after the string

          The SQL standard states that the units after the string specify
          the units of the string, e.g. INTERVAL '2' MINUTE should
          return '00:02:00'.  The current behavior has the units
          restrict the interval value to the specified unit or unit range,
          INTERVAL '70' SECOND returns '00:00:10'.

          For syntax that isn't uniquely ISO or PG syntax, like '1' or
          '1:30', treat as ISO if there is a range specification clause,
          and as PG if there no clause is present, e.g. interpret
          '1:30' MINUTE TO SECOND as '1 minute 30 seconds', and
          interpret '1:30' as '1 hour, 30 minutes'.

          This makes common cases like SELECT INTERVAL '1' MONTH
          SQL-standard results.  The SQL standard supports a limited
          number of unit combinations and doesn't support unit names
          in the string.  The PostgreSQL syntax is more flexible in
          the range of units supported, e.g. PostgreSQL supports
          '1 year 1 hour', while the SQL standard does not.
2006-04-25 00:01:44 +00:00
Bruce Momjian 02b59c6ebd Done;
o -Add support for day-time syntax, INTERVAL '1 2:03:04'DAY TO
      SECOND
2006-04-24 22:59:46 +00:00
Bruce Momjian ec9d01e8e2 Done:
o -Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO
        SECOND
2006-04-24 22:56:11 +00:00
Bruce Momjian 109d0aeb11 Add:
< * -Eventually enable escape_string_warning and standard_conforming_strings
> * -Enable escape_string_warning and standard_conforming_strings
> * Make standard_conforming_strings the default in 8.3?
>
>   When this is done, backslash-quote should be prohibited in non-E''
>   strings because of possible confusion over how such strings treat
>   backslashes.  Basically, '' is always safe for a literal single
>   quote, while \' might or might not be based on the backslash
>   handling rules.
>
2006-04-23 04:00:06 +00:00
Bruce Momjian efe3de07e9 Removes or minimizes some documentation mentions of backward
compatibility for release 7.2 and earlier.  I have not altered any
mentions of release 7.3 or later.  The release notes were not modified,
so the changes are still documented, just not in the main docs.
2006-04-23 03:39:52 +00:00
Bruce Momjian 044c3b4615 Update:
< 	o Fix psql's backslash commands more consistent
> 	o Fix psql's \d commands more consistent
2006-04-22 18:18:24 +00:00
Bruce Momjian 11c4152919 Update:
< 	o Fix psql's \dn for various schema combinations (Neil)
> 	o Fix psql's backslash commands more consistent
625a626
> 	  http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php
2006-04-22 18:17:57 +00:00
Bruce Momjian 0a66e482a7 Update:
o Fix psql's \dn for various schema combinations (Neil)

          http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php
2006-04-22 16:06:44 +00:00
Bruce Momjian 9d483b7bcf Suggest Win32 users user E'' strings and double backslashes used for
patch separators in COPY.

Backpatch doubleing backslashes suggestion to 8.1.
2006-04-22 03:03:11 +00:00
Bruce Momjian 1b4504ced2 Remove from TODO ability to edit pg_hba.conf, but add GRANT connection
permission item:

< 	o %Allow pg_hba.conf settings to be controlled via SQL
> 	o %Allow per-database permissions to be set via GRANT
< 	  This would add a function to load the SQL table from
<           pg_hba.conf, and one to writes its contents to the flat file.
< 	  The table should have a line number that is a float so rows
< 	  can be inserted between existing rows, e.g. row 2.5 goes
< 	  between row 2 and row 3.
> 	  Allow database connection checks based on GRANT rules in
> 	  addition to the existing access checks in pg_hba.conf.
2006-04-21 20:46:22 +00:00
Bruce Momjian 19fe9a904a Add detail:
< 	  encoding.
> 	  encoding.  This requires using mblen() to determine if the
> 	  backslash is inside or outside a multi-byte sequence.
2006-04-19 22:35:42 +00:00