Commit Graph

6762 Commits

Author SHA1 Message Date
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
Bruce Momjian ce8c6aa76c Add:
>
> 	o Add new version of PQescapeString() that doesn't double backslashes
> 	  that are part of a client-only multibyte sequence
>
> 	  Single-quote is not a valid byte in any supported client-only
> 	  encoding.
>
> 	o Add new version of PQescapeString() that doesn't double
> 	  backslashes when standard_conforming_strings is true and
> 	  non-E strings are used
2006-04-19 21:50:19 +00:00
Bruce Momjian b3e4a84ba5 Add:
> 	  o Add reporting of the current WAL file, perhaps as part of
> 	    partial log file archiving
2006-04-19 02:46:32 +00:00
Bruce Momjian af86aa8443 Remove kill mention in install docs, was for pre-7.0 releases. 2006-04-18 22:52:07 +00:00
Bruce Momjian f57b2f09a8 Mention "syntax" error as not logged by log_statement.
Backpatch.
2006-04-18 12:41:15 +00:00
Bruce Momjian 5bd59b9c0a Document that errors are not output by log_statement (was they were in
8.0), and add as suggestion to use log_min_error_statement for this
purpose.  I also fixed the code so the first EXECUTE has it's prepare,
rather than the last which is what was in the current code.  Also remove
"protocol" prefix for SQL EXECUTE output because it is not accurate.

Backpatch to 8.1.X.
2006-04-18 00:52:23 +00:00
Bruce Momjian 8e7aaeb62e Done:
< 	o Update pg_dump and psql to use the new COPY libpq API (Christopher)
> 	o -Update pg_dump and psql to use the new COPY libpq API (Christopher)
2006-04-17 03:18:07 +00:00
Bruce Momjian 922f7536c9 Remove:
< 	o %Have pg_dump use multi-statement transactions for INSERT dumps
2006-04-15 18:13:11 +00:00
Bruce Momjian 598dfee552 Document that pg_dump -d/-D prevents invalid data from canceling the
entire table load.
2006-04-15 18:11:16 +00:00
Tom Lane 3651a3e6fb Support the syntax
CREATE AGGREGATE aggname (input_type) (parameter_list)
along with the old syntax where the input type was named in the parameter
list.  This fits more naturally with the way that the aggregate is identified
in DROP AGGREGATE and other utility commands; furthermore it has a natural
extension to handle multiple-input aggregates, where the basetype-parameter
method would get ugly.  In fact, this commit fixes the grammar and all the
utility commands to support multiple-input aggregates; but DefineAggregate
rejects it because the executor isn't fixed yet.
I didn't do anything about treating agg(*) as a zero-input aggregate instead
of artificially making it a one-input aggregate, but that should be considered
in combination with supporting multi-input aggregates.
2006-04-15 17:45:46 +00:00
Bruce Momjian ebd5257d49 Done:
> * -Re-enable the GUC full_page_writes in 8.2 when reliability issues have
2006-04-14 22:26:22 +00:00
Bruce Momjian dcdf738abb Fix HTML markup. 2006-04-13 12:20:36 +00:00
Bruce Momjian 2aca4e84af Update tutorial URL's. 2006-04-13 12:14:41 +00:00
Bruce Momjian 452b2fc6e4 Update URL for SQL tutorial. 2006-04-13 12:09:08 +00:00
Bruce Momjian 98c6c966bc Update AIX FAQ:
At any rate, here's a revision to CVS HEAD to reflect some changes by
myself and by Seneca Cunningham for the AIX FAQ.  It touches on the
following issues:

1.  memcpy pointer patch for dynahash.c

2.  AIX memory management, which can, for 32 bit cases, bite people
    quite unexpectedly...

Chris Browne
2006-04-13 11:41:02 +00:00
Bruce Momjian 9204980aa1 Update:
<   multiple I/O channels simultaneously.
>   multiple I/O channels simultaneously.  One idea is to create a
>   background reader that can pre-fetch sequential and index scan
>   pages needed by other backends.  This could be expanded to allow
>   concurrent reads from multiple devices in a partitioned table.
2006-04-13 10:50:13 +00:00
Bruce Momjian 6ae559daf8 Add, "How do I submit a patch" FAQ item. 2006-04-12 20:03:54 +00:00
Bruce Momjian 4f6039de6e Add second sentence:
<P>The maximum table size, row size, and maximum number of columns
    can be quadrupled by increasing the default block size to 32k.  The
    maximum table size can also be increased using table partitioning.</P>
2006-04-12 18:56:16 +00:00
Bruce Momjian 031e3c8b84 Updated Japanese FAQ, version 2.
J.Kuwamura
2006-04-11 21:21:52 +00:00
Bruce Momjian f54a070268 Update Japanese FAQ, backpatch.
J.Kuwamura
2006-04-11 21:18:03 +00:00
Bruce Momjian ef5fde0881 Oops, sysctl, not sysconf, for FreeBSD. 2006-04-11 21:04:52 +00:00
Bruce Momjian 7626181bf7 More FreeBSD jail wording improvements. 2006-04-11 19:45:33 +00:00
Bruce Momjian cc7b6c75e3 Update jail wording to mention non-root users. 2006-04-11 19:42:27 +00:00
Bruce Momjian ba60acf17e Add documentation about running postmasters in FreeBSD jails (use
separate users).
2006-04-11 19:26:42 +00:00
Bruce Momjian fac2ba5da3 There is updated Russian translation of the FAQ in the attachment.
Victor Vislobokov
2006-04-11 15:48:11 +00:00
Bruce Momjian 3f040b1ff8 Done, per Tom:
< * Allow user-defined functions retuning a domain value to enforce domain
> * -Allow user-defined functions retuning a domain value to enforce domain
2006-04-11 02:08:19 +00:00
Bruce Momjian 857b0cd127 Add:
* Re-enable the GUC full_page_writes in 8.2 when reliability issues have
  been addressed
2006-04-10 23:15:46 +00:00
Bruce Momjian e7101b6b82 Add:
> * Allow log_min_messages to be specified on a per-module basis
>
>   This would allow administrators to see more detailed information from
>   specific sections of the backend, e.g. checkpoints, autovacuum, etc.
2006-04-10 21:06:23 +00:00
Bruce Momjian fb2b198609 Add:
< * Experiment with multi-threaded backend [thread]
> * Experiment with multi-threaded backend for backend creation [thread]
1003a1004,1008
>
> * Experiment with multi-threaded backend better resource utilization
>
>   This would allow a single query to make use of multiple CPU's or
>   multiple I/O channels simultaneously.
2006-04-09 20:24:30 +00:00
Bruce Momjian 83843a4439 Update:
> * Allow the creation of indexes with mixed ascending/descending
>   specifiers
>
>   This is possible now by creating an operator class with reversed sort
>   operators.  One complexity is that NULLs would then appear at the start
>   of the result set, and this might affect certain sort types, like
>   merge join.
>
2006-04-09 03:27:06 +00:00
Peter Eisentraut 0bc2a8ca65 Build src/test/regress/README during tarball making like the other
generated text files.  Fix build of that file, too.

Put the text files in the right place during make dist, so there are no
extra manual steps required anymore.
2006-04-06 18:54:37 +00:00
Bruce Momjian 9e0eff05ca Update AIX FAQ to show readline options more clearly.
Backpatch FAQ's to 8.1.X.
2006-04-05 22:55:05 +00:00
Tom Lane 7fdb4305db Fix a bunch of problems with domains by making them use special input functions
that apply the necessary domain constraint checks immediately.  This fixes
cases where domain constraints went unchecked for statement parameters,
PL function local variables and results, etc.  We can also eliminate existing
special cases for domains in places that had gotten it right, eg COPY.

Also, allow domains over domains (base of a domain is another domain type).
This almost worked before, but was disallowed because the original patch
hadn't gotten it quite right.
2006-04-05 22:11:58 +00:00
Tom Lane 147d4bf3e5 Modify all callers of datatype input and receive functions so that if these
functions are not strict, they will be called (passing a NULL first parameter)
during any attempt to input a NULL value of their datatype.  Currently, all
our input functions are strict and so this commit does not change any
behavior.  However, this will make it possible to build domain input functions
that centralize checking of domain constraints, thereby closing numerous holes
in our domain support, as per previous discussion.

While at it, I took the opportunity to introduce convenience functions
InputFunctionCall, OutputFunctionCall, etc to use in code that calls I/O
functions.  This eliminates a lot of grotty-looking casts, but the main
motivation is to make it easier to grep for these places if we ever need
to touch them again.
2006-04-04 19:35:37 +00:00
Tom Lane eaef111396 Define a separately configurable XLOG_BLCKSZ symbol for the page size
used within WAL files.  Historically this was the same as the data file
BLCKSZ, but there's no necessary connection, and it's possible that
performance gains might ensue from reducing XLOG_BLCKSZ.  In any case
distinguishing two symbols should improve code clarity.  This commit
does not actually change the page size, only provide the infrastructure
to make it possible to do so.  initdb forced because of addition of a
field to pg_control.
Mark Wong, with some help from Simon Riggs and Tom Lane.
2006-04-03 23:35:05 +00:00
Bruce Momjian ef524d1775 Add to qsort TODO.detail. 2006-04-03 03:46:16 +00:00
Bruce Momjian 97ae541cf4 Update for max row size. 2006-04-03 03:40:20 +00:00
Bruce Momjian 713cc92531 Update max row size to 400gb, per Tom. 2006-04-03 03:39:23 +00:00
Neil Conway 7815ca7bef Rewrite much of psql's \connect code, for the sake of code clarity and
to fix regressions introduced in the recent patch adding additional
\connect options. This is based on work by Volkan YAZICI, although
this version of the patch doesn't bear much resemblance to Volkan's
version.

\connect takes 4 optional arguments: database name, user name, host
name, and port number. If any of those parameters are omitted or
specified as "-", the value of that parameter from the previous
connection is used instead; if there is no previous connection,
the libpq default is used. Note that this behavior makes it
impossible to reuse the libpq defaults without quitting psql and
restarting it; I don't really see the use case for needing to do
that.
2006-04-02 20:08:22 +00:00
Peter Eisentraut f7ae90041e Update information schema for SQL:2003 and new PostgreSQL features. 2006-04-02 17:38:13 +00:00
Neil Conway d73336f8f4 Correct some errors and do some SGML police work on the reference pages
for REASSIGN OWNED and DROP OWNED.
2006-04-02 04:02:40 +00:00
Neil Conway a619e068d3 Minor improvement to DROP TABLE reference page. 2006-04-02 03:56:40 +00:00
Bruce Momjian 0220282266 Add recent /port/qsort comparison discussion. 2006-04-02 01:27:42 +00:00
Peter Eisentraut 5094f99830 Document long names for format options (plain, tar, custom). They already
worked and someone asked about them, so we might as well document them.
2006-03-17 16:02:47 +00:00
Bruce Momjian f3d99d160d Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
Neil Conway 0ebf1cc834 Implement 4 new aggregate functions from SQL2003. Specifically: var_pop(),
var_samp(), stddev_pop(), and stddev_samp(). var_samp() and stddev_samp()
are just renamings of the historical Postgres aggregates variance() and
stddev() -- the latter names have been kept for backward compatibility.
This patch includes updates for the documentation and regression tests.
The catversion has been bumped.

NB: SQL2003 requires that DISTINCT not be specified for any of these
aggregates. Per discussion on -patches, I have NOT implemented this
restriction: if the user asks for stddev(DISTINCT x), presumably they
know what they are doing.
2006-03-10 20:15:28 +00:00
Bruce Momjian 497b5ad928 Make $PostgreSQL CVS tags consistent for SGML files. 2006-03-10 19:10:50 +00:00
Tom Lane 66fc528d99 Remove somebody's flight of fancy about an UPDATE with ORDER BY and LIMIT. 2006-03-08 22:59:09 +00:00
Bruce Momjian ce1106d2fa Properly set "escape_string_warning" to default to true. 2006-03-07 02:54:23 +00:00
Bruce Momjian 135fe1899d SGML typo fix. 2006-03-06 22:54:14 +00:00
Bruce Momjian 1c02144731 Done though the second is default so off in 8.2:
> * -Eventually enable escape_string_warning and standard_conforming_strings
2006-03-06 22:51:20 +00:00
Bruce Momjian d69b163247 Attached is the new patch. To summarize:
- new function justify_interval(interval)
   - modified function justify_hours(interval)
   - modified function justify_days(interval)

These functions are defined to meet the requirements as discussed in
this thread.  Specifically:

   - justify_hours makes certain the sign bit on the hours
     matches the sign bit on the days.  It only checks the
     sign bit on the days, and not the months, when
     determining if the hours should be positive or negative.
     After the call, -24 < hours < 24.

   - justify_days makes certain the sign bit on the days
     matches the sign bit on the months.  It's behavior does
     not depend on the hours, nor does it modify the hours.
     After the call, -30 < days < 30.

   - justify_interval makes sure the sign bits on all three
     fields months, days, and hours are all the same.  After
     the call, -24 < hours < 24 AND -30 < days < 30.

Mark Dilger
2006-03-06 22:49:17 +00:00
Bruce Momjian 19c21d115d Enable standard_conforming_strings to be turned on.
Kevin Grittner
2006-03-06 19:49:20 +00:00
Bruce Momjian ebdc35822d Add:
> 	o Prevent parent tables from altering or dropping constraints
> 	  like CHECK that are inherited by child tables
>
> 	  Dropping constraints should only be possible with CASCADE.
>
2006-03-06 17:10:31 +00:00
Bruce Momjian 2abf8c7719 Update item. 2006-03-06 15:21:42 +00:00
Bruce Momjian d2eb1d12a0 Add for Win32:
> 	o Check WSACancelBlockingCall() for interrupts (win32intr)
>
2006-03-06 15:19:45 +00:00
Bruce Momjian 07408e841d Add WSACancelBlockingCall TODO.detail item. 2006-03-06 15:19:19 +00:00
Bruce Momjian e166574a1d Add for ecpg:
> 	o Add COPY TO STDIN / STDOUT handling
2006-03-06 15:13:38 +00:00
Bruce Momjian 2f01703f90 Update:
< * %Disallow changing sequence characteristics like INCREMENT for SERIAL columns
> * %Disallow ALTER SEQUENCE changes for SERIAL sequences because pg_dump
>   does not dump the changes
2006-03-06 05:22:31 +00:00
Bruce Momjian 1ad126314f Add:
> * %Disallow changing sequence characteristics like INCREMENT for SERIAL columns
2006-03-06 05:16:21 +00:00
Bruce Momjian 7d40942a27 in the docs, the function "ascii(text)" is described as
returning "ASCII code of the first character of the argument"

(see
http://www.postgresql.org/docs/8.1/interactive/functions-string.html,
Table  9-6. "Other String Functions").

Presumably this should read "ASCII code of the first byte of the
argument",
which is what is returned when the argument is a multi-byte character
(although then with UTF-8 at least that might not necessarily be an
ASCII
code).

Ian Barwick
2006-03-06 04:53:50 +00:00
Bruce Momjian f9520ac110 Add:
> 	o Port contrib/xml2
2006-03-05 18:28:46 +00:00
Andrew Dunstan 5d723d05c0 Prepared queries for PLPerl, plus fixing a small plperl memory leak. Patch
and docs from Dmitry Karasik, slightly editorialised.
2006-03-05 16:40:51 +00:00
Bruce Momjian f2f5b05655 Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
Bruce Momjian 5173b1a40f Done:
> 	o -Add "include file" functionality in postgresql.conf
2006-03-05 15:16:58 +00:00
Tom Lane c1bb2877b2 Improve OS X shared-memory documentation: fix typos and provide a usable
example of /etc/sysctl.conf contents.
2006-03-05 03:50:44 +00:00
Tom Lane 5b8ac71042 Support include directives in postgresql.conf.
Patch by Joachim Wieland, somewhat reworked for clarity and portability.
2006-03-04 22:19:31 +00:00
Bruce Momjian 18bc9ea561 Add:
> * Allow FSM page return free space based on table clustering, to assist
>   in maintaining clustering?
2006-03-04 05:02:03 +00:00
Bruce Momjian f1d7f80c1a > It doesn't say that only the listed commands acquire ACCESS EXCLUSIVE,
> just that certain commands do.  TRUNCATE isn't shown.

Patch against HEAD to add TRUNCATE to the list of commands that aquire
ACCESS EXCLUSIVE.

Jim C. Nasby, Sr.
2006-03-04 04:41:36 +00:00
Bruce Momjian 26d6054128 That was a typo in my comment before the code (the nutshell
descriptions after the code are correct). Only shmmax needs to be
multiples of the page size (at least, that's how I interpret the
Darwin code).

Chris Campbell
2006-03-04 03:47:29 +00:00
Bruce Momjian 43e9bab94a Rename Online Backup to Continuous Archiving. 2006-03-03 22:02:08 +00:00
Tom Lane 523adeb111 Teach PQcmdTuples() that a COPY command tag might contain a row count,
and tighten up its sanity checking of the tag as a safety measure.
Volkan Yazici.
2006-03-03 20:57:32 +00:00
Bruce Momjian f4a4755734 Done:
> * -Allow TRUNCATE ... CASCADE/RESTRICT
2006-03-03 20:43:00 +00:00
Bruce Momjian c776fba1e1 Done:
< 	o %Have COPY return the number of rows loaded/unloaded?
> 	o -Have COPY return the number of rows loaded/unloaded?
2006-03-03 20:37:29 +00:00
Tom Lane 023570f5e3 Make the COPY command return a command tag that includes the number of
rows copied.  Backend side of Volkan Yazici's recent patch, with
corrections and documentation.
2006-03-03 19:54:10 +00:00
Tom Lane 984a6ced3e Add CASCADE option to TRUNCATE. Joachim Wieland 2006-03-03 03:30:54 +00:00
Bruce Momjian 2a0ba3f8dd Add:
> * Allow FSM to return free space toward the beginning of the heap file,
>   in hopes that empty pages at the end can be truncated by VACUUM
2006-03-03 03:13:04 +00:00
Bruce Momjian b35440eae8 Appended is a small documentation patch that adds a note to the CREATE
ROLE page, based on what Tom Lane told me here:

	http://archives.postgresql.org/pgsql-general/2005-11/msg00998.php


Joachim Wieland
2006-03-03 03:06:05 +00:00
Bruce Momjian 66eccb466e Add:
> * Add missing parameter handling in to_char()
>
> 	http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php
>
2006-03-03 02:38:57 +00:00
Bruce Momjian d65b4e30f0 Add:
> * Allow to_date() and to_timestamp() accept localized month names
2006-03-03 02:18:09 +00:00
Tom Lane 56aa84a69c Fix ancient error in large objects usage example: overwrite() subroutine
was opening with INV_READ flag and then writing.  Prior to 8.1 the backend
did not reject this, but now it does.
2006-03-02 21:49:09 +00:00
Bruce Momjian 487b7f5de3 Update OS X shared memory documentation for 10.3.9 and later to use
/etc/sysctl.conf.

Chris Campbell
2006-03-02 20:30:21 +00:00
Bruce Momjian 33a84bb306 Mark tsearch2 item as Tom's, not Teodor's. 2006-03-02 19:34:43 +00:00
Bruce Momjian 989d94a171 Update TODO.detail/qsort. 2006-03-02 19:21:05 +00:00
Bruce Momjian 8da308036d Update TODO.detail/qsort. 2006-03-02 19:20:44 +00:00
Bruce Momjian 85fa9f516c Update TODO.detail/qsort. 2006-03-02 18:20:25 +00:00
Bruce Momjian 1fa33539ab Add to TODO.detail for qsort. 2006-03-02 18:18:13 +00:00
Bruce Momjian f79df7fcc9 Add:
> * Improve port/qsort() to handle sorts with 50% unique and 50% duplicate
>   value [qsort]
>
>   This involves choosing better pivot points for the quicksort.
2006-03-02 18:18:00 +00:00
Bruce Momjian 8fe61f0d86 Update text file. 2006-03-01 22:24:51 +00:00
Bruce Momjian 711c38398e Update patch generation instructions.
Robert Treat
2006-03-01 22:23:14 +00:00
Bruce Momjian 0cb0ec9ed9 Update Japanese FAQ, backpatched to 8.1.X. 2006-03-01 20:31:29 +00:00
Neil Conway 8e5a10d46c This patch makes the error message strings throughout the backend
more compliant with the error message style guide. In particular,
errdetail should begin with a capital letter and end with a period,
whereas errmsg should not. I also fixed a few related issues in
passing, such as fixing the repeated misspelling of "lexeme" in
contrib/tsearch2 (per Tom's suggestion).
2006-03-01 06:30:32 +00:00
Bruce Momjian 87fa10a426 Add pg_service.conf documentation for libpq. 2006-03-01 00:23:21 +00:00
Tom Lane 8e68d78390 Allow the syntax CREATE TYPE foo, with no parameters, to permit explicit
creation of a shell type.  This allows a less hacky way of dealing with
the mutual dependency between a datatype and its I/O functions: make a
shell type, then make the functions, then define the datatype fully.
We should fix pg_dump to handle things this way, but this commit just deals
with the backend.

Martijn van Oosterhout, with some corrections by Tom Lane.
2006-02-28 22:37:27 +00:00
Bruce Momjian 7f19339cca Back out libpq changes for service --- not ready yet. 2006-02-28 22:35:35 +00:00
Bruce Momjian b04d19f230 Fix PG_VERSION_NUM for different awk -F handling. 2006-02-28 22:34:24 +00:00
Bruce Momjian c6b6f7ad64 Add:
* Split out libpq pgpass and environment documentation sections to make
  it easier for non-developers to find
2006-02-28 19:48:03 +00:00
Bruce Momjian 52d010d857 Done:
> * -Add 'tid != tid ' operator for use in corruption recovery
2006-02-26 21:22:47 +00:00
Neil Conway c5e0415a28 Minor SGML work: add some more hyperlinks, where appropriate. 2006-02-26 03:20:46 +00:00
Neil Conway f33d3bc0bf TODO updates:
- "Add ON COMMIT capability to CREATE TABLE AS ... SELECT" is done

- "Allow PREPARE to automatically determine parameter types" is done

- "Clean up compiler warnings (especially with gcc version 4)" is done:
  AFAIK there are no remaining gcc4 compiler warnings to be fixed.

- Creating rules to do view updates is *not* an easy TODO item
2006-02-26 01:21:57 +00:00
Bruce Momjian 305c82e6bb Add intervals:
> 	o Allow infinite dates and intervals just like infinite timestamps
2006-02-25 16:34:52 +00:00
Bruce Momjian 8c71af130c Fix computation of sample table size. 2006-02-25 04:28:54 +00:00
Bruce Momjian 8e8972832a Remove duplicate:
< 	o %Disallow dropping of an inherited constraint
2006-02-25 03:40:14 +00:00
Bruce Momjian 0915d370f5 Remove mention of MIN/MAX() not using indexes. 2006-02-24 14:59:54 +00:00
Bruce Momjian eb8f9cc066 Mention that the archive history file has the wal start/stop file names. 2006-02-24 14:03:01 +00:00
Neil Conway 85c0eac1af Add TABLESPACE and ON COMMIT clauses to CREATE TABLE AS. ON COMMIT is
required by the SQL standard, and TABLESPACE is useful functionality.
Patch from Kris Jurka, minor editorialization by Neil Conway.
2006-02-19 00:04:28 +00:00
Neil Conway 8c5dfbabff Minor SGML style police work. 2006-02-18 23:14:45 +00:00
Peter Eisentraut 1b658473ea Add support for Windows codepages 1253, 1254, 1255, and 1257 and clean
up a bunch of the support utilities.

In src/backend/utils/mb/Unicode remove nearly duplicate copies of the
UCS_to_XXX perl script and replace with one version to handle all generic
files.  Update the Makefile so that it knows about all the map files.
This produces a slight difference in some of the map files, using a
uniform naming convention and not mapping the null character.

In src/backend/utils/mb/conversion_procs create a master utf8<->win
codepage function like the ISO 8859 versions instead of having a separate
handler for each conversion.

There is an externally visible change in the name of the win1258 to utf8
conversion.  According to the documentation notes, it was named
incorrectly and this changes it to a standard name.

Running the Unicode mapping perl scripts has shown some additional mapping
changes in koi8r and iso8859-7.
2006-02-18 16:15:23 +00:00
Peter Eisentraut 422998d275 Put the first section of a chapter in its own chunk. 2006-02-16 01:03:48 +00:00
Bruce Momjian 99b384b8b6 Document that GRANT on a table does not affect sequence permissions,
inclusing SERIAL column sequences.
2006-02-14 03:32:14 +00:00
Bruce Momjian e93b33754c Document that xact commit/abort stats are collected if any stat variable
is set.
2006-02-14 02:03:44 +00:00
Tom Lane d537e0b41b Improve documentation of --single-transaction option: fix markup, and
don't promise more than the code actually delivers.
2006-02-13 21:29:08 +00:00
Bruce Momjian 589b67d34b Add:
>
> 	o Allow pg_hba.conf to specify host names along with IP addresses
>
> 	  Host name lookup could occur when the postmaster reads the
> 	  pg_hba.conf file, or when the backend starts.  Another
> 	  solution would be to reverse lookup the connection IP and
> 	  check that hostname against the host names in pg_hba.conf.
> 	  We could also then check that the host name maps to the IP
> 	  address.
2006-02-13 03:55:02 +00:00
Tom Lane 47a048f3f3 Update release notes. 2006-02-12 22:35:26 +00:00
Tom Lane 1ac1526ea0 Fix broken markup. 2006-02-12 20:31:58 +00:00
Bruce Momjian 3694e70682 Not done:
> 	o %Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
2006-02-12 19:13:19 +00:00
Bruce Momjian 04a2b54c09 Revert patch becaues of locking concerns:
Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME

Joachim Wieland
2006-02-12 19:11:01 +00:00
Bruce Momjian 92a26489ac > Actually, if you submit a patch that says either "SCROLL is the
default"
> or "NO SCROLL is the default", it will be rejected as incorrect.  The
> reason is that the default behavior is different from either of these,
> as is explained in the NOTES section.

Ok, so *that's* where the bit about the query plan being simple enough.
Based on that, ISTM that it should be premissable for us to decide that
a cursor requiring a sort isn't "simple enough" to support SCROLL.

In any case, here's a patch that makes the non-standard behavior easier
for people to find.

Jim C. Nasby
2006-02-12 19:02:15 +00:00
Bruce Momjian 0bbd470443 Fix release item ordering. 2006-02-12 18:13:10 +00:00
Bruce Momjian 6df2da06bd Update back branch release notes. 2006-02-12 17:57:37 +00:00
Bruce Momjian a321d6755f Fix release markup. 2006-02-12 17:27:33 +00:00
Bruce Momjian cffed790ec Update for 8.1.3. 2006-02-12 17:15:57 +00:00
Bruce Momjian 720bad3b32 Update release notes for 8.1.3. 2006-02-12 17:10:47 +00:00
Bruce Momjian 20b508308a Done:
> * -Add COMMENT ON for all cluster global objects (roles, databases
2006-02-12 06:51:14 +00:00
Tom Lane 15c72174f3 Apply code-reviewed version of for-scalar-list patch: mostly, fixing
it to report reasonable errors in error cases.
2006-02-12 06:37:05 +00:00
Bruce Momjian 58634caa0f Add MSVC support for utility commands and pg_dump.
Hiroshi Saito
2006-02-12 06:11:51 +00:00
Bruce Momjian 025ffe586f Allow PL/pgSQL FOR statement to return values to scalars as well as
records and row types.

Pavel Stehule
2006-02-12 06:03:38 +00:00
Bruce Momjian 136c3b87ac Done:
> * -Allow to_char() to print localized month names
2006-02-12 04:44:17 +00:00
Bruce Momjian f695750c43 Allow to_char() to print localized month and day names.
Euler Taveira de Oliveira
2006-02-12 04:44:15 +00:00
Bruce Momjian 0f57851e31 Add psql option:
-1 or --single-transaction

Simon Riggs
2006-02-12 04:04:32 +00:00
Bruce Momjian 3884ede663 Done:
> * -Add system view to show free space map contents
2006-02-12 03:56:13 +00:00
Bruce Momjian f9a726aa88 I've created a new shared catalog table pg_shdescription to store
comments on cluster global objects like databases, tablespaces, and
roles.

It touches a lot of places, but not much in the way of big changes.  The
only design decision I made was to duplicate the query and manipulation
functions rather than to try and have them handle both shared and local
comments.  I believe this is simpler for the code and not an issue for
callers because they know what type of object they are dealing with.
This has resulted in a shobj_description function analagous to
obj_description and backend functions [Create/Delete]SharedComments
mirroring the existing [Create/Delete]Comments functions.

pg_shdescription.h goes into src/include/catalog/

Kris Jurka
2006-02-12 03:22:21 +00:00
Bruce Momjian 07bae9c099 Please find enclosed a patch that lets you use \c to connect
(optionally) to a new host and port without exiting psql.  This
eliminates, IMHO, a surprise in that you can now connect to PostgreSQL
on a differnt machine from the one where you started your session. This
should help people who use psql as an administrative tool.

David Fetter
2006-02-12 02:54:30 +00:00
Tom Lane fd267c1ebc Skip ambulkdelete scan if there's nothing to delete and the index is not
partial.  None of the existing AMs do anything useful except counting
tuples when there's nothing to delete, and we can get a tuple count
from the heap as long as it's not a partial index.  (hash actually can
skip anyway because it maintains a tuple count in the index metapage.)
GIST is not currently able to exploit this optimization because, due to
failure to index NULLs, GIST is always effectively partial.  Possibly
we should fix that sometime.
Simon Riggs w/ some review by Tom Lane.
2006-02-11 23:31:34 +00:00
Bruce Momjian a02f6ce33b Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
Joachim Wieland
2006-02-11 22:17:19 +00:00
Bruce Momjian 3fcb38f031 Done:
> 	o -Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
2006-02-11 22:17:17 +00:00
Bruce Momjian 97d37b7a22 Done:
< 	o Improve psql's handling of multi-line statements
> 	o -Improve psql's handling of multi-line statements
2006-02-11 21:55:49 +00:00
Bruce Momjian 642c8cc470 Done:
> * -Allow INET + INT8 to increment the host part of the address or
2006-02-11 03:33:36 +00:00
Bruce Momjian 1372515271 Add INET/CIDR operators: and, or, not, plus int8, minus int8, and inet
minus inet.

Stephen R. van den Berg
2006-02-11 03:32:41 +00:00
Bruce Momjian af03b689dd Done:
< 	o Allow multi-line column values to align in the proper columns
> 	o -Allow multi-line column values to align in the proper columns
2006-02-10 04:14:17 +00:00
Tom Lane 7ae2ccbc85 Reject out-of-range dates in date_in().
Kris Jurka
2006-02-09 03:39:17 +00:00
Bruce Momjian 15be0b8cd1 Remove question mark:
< * %Disallow changing default expression of a SERIAL column?
> * %Disallow changing default expression of a SERIAL column
2006-02-07 14:49:17 +00:00
Bruce Momjian 04a942e31e Split up wal-logging items:
< * Allow control over which tables are WAL-logged [walcontrol]
> * Allow WAL logging to be turned off for a table, but the table
>   might be dropped or truncated during crash recovery [walcontrol]
<   commit.  To do this, only a single writer can modify the table, and
<   writes must happen only on new pages.  Readers can continue accessing
<   the table.  This would affect COPY, and perhaps INSERT/UPDATE too.
<   Another option is to avoid transaction logging entirely and truncate
<   or drop the table on crash recovery.  These should be implemented
<   using ALTER TABLE, e.g. ALTER TABLE PERSISTENCE [ DROP | TRUNCATE |
<   STABLE | DEFAULT ].  Tables using non-default logging should not use
<   referential integrity with default-logging tables, and tables using
<   stable logging probably can not have indexes.  One complexity is
<   the handling of indexes on TOAST tables.
>   commit.  This should be implemented using ALTER TABLE, e.g. ALTER
>   TABLE PERSISTENCE [ DROP | TRUNCATE | DEFAULT ].  Tables using
>   non-default logging should not use referential integrity with
>   default-logging tables.  A table without dirty buffers during a
>   crash could perhaps avoid the drop/truncate.
>
> * Allow WAL logging to be turned off for a table, but the table would
>   avoid being truncated/dropped [walcontrol]
>
>   To do this, only a single writer can modify the table, and writes
>   must happen only on new pages so the new pages can be removed during
>   crash recovery.  Readers can continue accessing the table.  Such
>   tables probably cannot have indexes.  One complexity is the handling
>   of indexes on TOAST tables.
2006-02-07 02:08:08 +00:00
Bruce Momjian db5e39b2f0 Fix typo in configuration docs.
Devrim GUNDUZ
2006-02-05 18:19:14 +00:00
Bruce Momjian 354213c7f4 Update PL/pgSQL trigger example to be clearer about how to "merge" data
into a table.

Jim C. Nasby
2006-02-05 02:47:53 +00:00
Tom Lane 3893127431 Fix constraint exclusion to work in inherited UPDATE/DELETE queries
... in fact, it will be applied now in any query whatsoever.  I'm still
a bit concerned about the cycles that might be expended in failed proof
attempts, but given that CE is turned off by default, it's the user's
choice whether to expend those cycles or not.  (Possibly we should
change the simple bool constraint_exclusion parameter to something
more fine-grained?)
2006-02-04 23:03:20 +00:00
Tom Lane 48d9ad3722 Fix broken markup. 2006-02-04 22:38:39 +00:00
Andrew Dunstan f8b54fe6ed DROP IF EXISTS for ROLE/USER/GROUP 2006-02-04 19:06:47 +00:00
Peter Eisentraut 3fa9c416ed Issue a warning if a change-on-restart-only postgresql.conf value is
modified  and the server config files are reloaded
2006-02-04 12:50:47 +00:00
Bruce Momjian bc6a824ca6 Update walcontrol item:
< * Allow control over which tables are WAL-logged
> * Allow control over which tables are WAL-logged [walcontrol]
1038c1038,1039
<   stable logging probably can not have indexes.  [walcontrol]
>   stable logging probably can not have indexes.  One complexity is
>   the handling of indexes on TOAST tables.
2006-02-04 03:23:21 +00:00
Bruce Momjian 3f8984039a Add to TODO.detail/walcontrol. 2006-02-04 03:22:36 +00:00
Bruce Momjian bd5d12a16b Add:
> * Allow statistics collector information to be pulled from the collector
>   process directly, rather than requiring the collector to write a
>   filesystem file twice a second?
2006-02-01 17:32:45 +00:00
Bruce Momjian c6ef3264be Move items:
> * Add SQL99 WITH clause to SELECT
> * Add SQL99 WITH RECURSIVE to SELECT
< * Add SQL99 WITH clause to SELECT
< * Add SQL99 WITH RECURSIVE to SELECT
2006-02-01 00:07:26 +00:00
Bruce Momjian 5eb29fea25 Add:
>
> 	o Prevent tab completion of SET TRANSACTION from querying the
> 	  database and therefore preventing the transaction isolation
> 	  level from being set.
>
> 	  Currently, SET <tab> causes a database lookup to check all
> 	  supported session variables.  This query causes problems
> 	  because setting the transaction isolation level must be the
> 	  first statement of a transaction.
2006-02-01 00:03:09 +00:00
Michael Meskes 097df388b7 Removed single quotes from connect to example. 2006-01-31 13:32:20 +00:00
Bruce Momjian 3125321934 Done:
< * %Prevent INET cast to CIDR if the unmasked bits are not zero, or
<   zero the bits
< * %Prevent INET cast to CIDR from dropping netmask, SELECT '1.1.1.1'::inet::cidr
> * -Zero umasked bits in conversion from INET cast to CIDR
> * -Prevent INET cast to CIDR from dropping netmask, SELECT '1.1.1.1'::inet::cidr
2006-01-26 02:50:11 +00:00
Tom Lane 8d8bf12760 Clean up the INET-vs-CIDR situation. Get rid of the internal is_cidr flag
and rely exclusively on the SQL type system to tell the difference between
the types.  Prevent creation of invalid CIDR values via casting from INET
or set_masklen() --- both of these operations now silently zero any bits
to the right of the netmask.  Remove duplicate CIDR comparison operators,
letting the type rely on the INET operators instead.
2006-01-26 02:35:51 +00:00
Tom Lane 726b42abd0 Improve wording of descriptions of SIGHUP GUC parameters, as per my
suggestion a couple days ago.  Fix some cases in which the documentation
neglected to mention any restriction on when a parameter can be set.
Try to be consistent about calling parameters parameters; use the term
option only for command-line switches.
2006-01-23 18:16:41 +00:00
Bruce Momjian 1bdc5ab2da Done:
< 	o Allow an alias to be provided for the target table in
< 	  UPDATE/DELETE
<
< 	  This is not SQL-spec but many DBMSs allow it.
<
> 	o -Allow an alias to be provided for the target table in
> 	  UPDATE/DELETE (Neil)
2006-01-23 02:59:27 +00:00
Tom Lane 16c5a471a3 Improve note about not using the target table name in the SET clause.
It's not related to whether an alias is used or not.
2006-01-22 20:34:11 +00:00
Neil Conway 1d763d9107 Allow an optional alias for the target table to be specified for UPDATE
and DELETE. If specified, the alias must be used instead of the full
table name. Also, the alias currently cannot be used in the SET clause
of UPDATE.

Patch from Atsushi Ogawa, various editorialization by Neil Conway.
Along the way, make the rowtypes regression test pass if add_missing_from
is enabled, and add a new (skeletal) regression test for DELETE.
2006-01-22 05:20:35 +00:00
Neil Conway 57a84ca48e Minor improvements to GEQO documentation. 2006-01-22 03:56:58 +00:00