Commit Graph

22805 Commits

Author SHA1 Message Date
Bruce Momjian 653fa21700 Clarify dynamic pl/pgsql item and add URLs. Restructure server-side
section into PL/pgSQL and non-PL/pgSQL sections:

< 	o Fix PL/pgSQL RENAME to work on variables other than OLD/NEW
< 	o Allow function parameters to be passed by name,
< 	  get_employee_salary(emp_id => 12345, tax_year => 2001)
< 	o Add Oracle-style packages
< 	o Add table function support to pltcl, plpython
< 	o Add capability to create and call PROCEDURES
< 	o Allow PL/pgSQL to handle %TYPE arrays, e.g. tab.col%TYPE[]
< 	o Allow function argument names to be statements from PL/PgSQL
< 	o Add MOVE to PL/pgSQL
< 	o Add support for polymorphic arguments and return types to
< 	  languages other than PL/PgSQL
< 	o Add support for OUT and INOUT parameters to languages other
< 	  than PL/PgSQL
< 	o Add single-step debugging of PL/PgSQL functions
< 	o Allow PL/PgSQL to support WITH HOLD cursors
< 	o Allow PL/PgSQL RETURN to return row or record functions
<
< 	  http://archives.postgresql.org/pgsql-patches/2005-11/msg00045.php
> 	o PL/pgSQL
> 		o Fix RENAME to work on variables other than OLD/NEW
> 		o Allow function parameters to be passed by name,
> 		  get_employee_salary(emp_id => 12345, tax_year => 2001)
> 		o Add Oracle-style packages
> 		o Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]
> 		o Allow listing of record column names, and access to
> 		  record columns via variables, e.g. columns := r.(*),
> 		  tval2 := r.(colname)
>
> 		  http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php
> 		  http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php
> 		  http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php
>
> 		o Add MOVE
> 		o Add single-step debugging of functions
> 		o Add support for WITH HOLD cursors
> 		o Allow PL/RETURN to return row or record functions
>
> 		  http://archives.postgresql.org/pgsql-patches/2005-11/msg00045.php
>
>
> 	o Other
> 		o Add table function support to pltcl, plpython
> 		o Add support for polymorphic arguments and return types to
> 		  languages other than PL/PgSQL
> 		o Add capability to create and call PROCEDURES
> 		o Add support for OUT and INOUT parameters to languages other
> 		  than PL/PgSQL
2006-06-15 16:54:13 +00:00
Bruce Momjian fce5033b4a Add:
> 	o Allow PL/PgSQL RETURN to return row or record functions
>
> 	  http://archives.postgresql.org/pgsql-patches/2005-11/msg00045.php
2006-06-15 16:02:32 +00:00
Bruce Momjian f8cdc265ea Done, removed:
<
< * Consider padding the spinlock structure to have spinlock registers
<   on different CPU cache line
<
<   http://archives.postgresql.org/pgsql-hackers/2005-10/msg00498.php
2006-06-15 02:23:13 +00:00
Tom Lane 8b9bc234ad Remove the limit on the number of entries allowed in catcaches, and
remove the infrastructure needed to enforce the limit, ie, the global
LRU list of cache entries.  On small-to-middling databases this wins
because maintaining the LRU list is a waste of time.  On large databases
this wins because it's better to keep more cache entries (we assume
such users can afford to use some more per-backend memory than was
contemplated in the Berkeley-era catcache design).  This provides a
noticeable improvement in the speed of psql \d on a 10000-table
database, though it doesn't make it instantaneous.

While at it, use per-catcache settings for the number of hash buckets
per catcache, rather than the former one-size-fits-all value.  It's a
bit silly to be using the same number of hash buckets for, eg, pg_am
and pg_attribute.  The specific values I used might need some tuning,
but they seem to be in the right ballpark based on CATCACHE_STATS
results from the standard regression tests.
2006-06-15 02:08:09 +00:00
Bruce Momjian e1e133f264 Add to locale TODO.detail. 2006-06-14 23:28:22 +00:00
Bruce Momjian a9d2cc4d76 Remove, done:
<
< * Add support for WIN1253 (Greek) encoding
<
<   http://archives.postgresql.org/pgsql-bugs/2005-12/msg00000.php
2006-06-14 23:19:04 +00:00
Bruce Momjian d5ddb87616 Add:
>
> * Add support for WIN1253 (Greek) encoding
>
>   http://archives.postgresql.org/pgsql-bugs/2005-12/msg00000.php
2006-06-14 23:07:55 +00:00
Bruce Momjian ca2bb27529 Add URL to ILIKE encoding fix:
>   http://archives.postgresql.org/pgsql-patches/2005-11/msg00173.php
2006-06-14 23:03:12 +00:00
Bruce Momjian 8d21abd733 Add:
>
> * Consider increasing internal areas when shared buffers is increased
>
>   http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php
2006-06-14 22:31:53 +00:00
Bruce Momjian cda6a5a580 Already done:
<
< 	o Properly mark all libpq-exported functions with "PQ"
<
< 	  http://archives.postgresql.org/pgsql-hackers/2005-10/msg00696.php
2006-06-14 22:23:05 +00:00
Bruce Momjian 6894d695fa Done by Peter:
< * Improve the information schema to be more standards-compliant:
<
<   http://archives.postgresql.org/pgsql-bugs/2005-10/msg00028.php
2006-06-14 21:58:21 +00:00
Bruce Momjian 456a852d5b Add:
>
> 	o Properly mark all libpq-exported functions with "PQ"
>
> 	  http://archives.postgresql.org/pgsql-hackers/2005-10/msg00696.php
2006-06-14 21:54:43 +00:00
Bruce Momjian 2f8ea0275d Add:
>
> * Consider padding the spinlock structure to have spinlock registers
>   on different CPU cache line
>
>   http://archives.postgresql.org/pgsql-hackers/2005-10/msg00498.php
2006-06-14 21:47:06 +00:00
Bruce Momjian 3c8c3ccf99 Add item, not fixed:
>
> * Fix ILIKE and regular expressions to handle case insensitivity
>   properly in multibyte encodings
>
>   http://archives.postgresql.org/pgsql-bugs/2005-10/msg00001.php
2006-06-14 21:40:00 +00:00
Bruce Momjian ca3d2c31f9 Remove, already in back branches:
<
< 	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.  This requires using mblen() to determine if the
< 	  backslash is inside or outside a multi-byte sequence.
<
< 	o Add new version of PQescapeString() that doesn't double
< 	  backslashes when standard_conforming_strings is true and
< 	  non-E strings are used
2006-06-14 21:38:21 +00:00
Bruce Momjian bcc97255f0 Done:
> 	o -Port contrib/xml2
2006-06-14 21:26:49 +00:00
Bruce Momjian c135db1d4c Add information schema item:
> * Improve the information schema to be more standards-compliant:
>
>   http://archives.postgresql.org/pgsql-bugs/2005-10/msg00028.php
> * Add URL to more complete multi-byte regression tests
>
>   http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php
< * Add URL to more complete multi-byte regression tests
<
<   http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php
2006-06-14 21:10:50 +00:00
Bruce Momjian 63b35a8cb1 Add COPY views patch URL:
> 	  http://archives.postgresql.org/pgsql-patches/2005-09/msg00148.php
2006-06-14 20:40:20 +00:00
Bruce Momjian 744697317e Add:
>
> 	o Add API for 64-bit large object access
>
> 	  http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php
2006-06-14 19:32:48 +00:00
Bruce Momjian 82009572ac Keep TODO.detail until item is done:
< 	o %Allow pg_dump to use multiple -t and -n switches
> 	o %Allow pg_dump to use multiple -t and -n switches  [pg_dump]
2006-06-14 19:02:06 +00:00
Bruce Momjian 22fd9a0ff8 Add URL, remove TODO.detail:
< 	o %Allow pg_dump to use multiple -t and -n switches [pg_dump]
> 	o %Allow pg_dump to use multiple -t and -n switches
>
> 	  http://archives.postgresql.org/pgsql-patches/2006-01/msg00190.php
>
2006-06-14 19:01:42 +00:00
Bruce Momjian 5b50ede670 Add locale/encoding references:
<   Right now only one encoding is allowed per database.
>   Right now only one encoding is allowed per database.  [locale]
> * Add CREATE COLLATE?  [locale]
2006-06-14 18:47:53 +00:00
Bruce Momjian bc29957202 Add locale TODO.detail emails. 2006-06-14 18:42:51 +00:00
Bruce Momjian 9ae8690ad2 Update link to TODO.detail:
< 	o Check WSACancelBlockingCall() for interrupts (win32intr)
> 	o Check WSACancelBlockingCall() for interrupts [win32intr]
2006-06-14 18:39:18 +00:00
Bruce Momjian f944f88021 Add:
> 	o Fix problem when cascading referential triggers make changes on
> 	  cascaded tables, seeing the tables in an intermediate state
>
> 	  http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php
> 	  http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php
2006-06-14 18:36:57 +00:00
Bruce Momjian 1e52c5eb96 Added:
>
> * Add URL to more complete multi-byte regression tests
>
>   http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php
2006-06-14 17:59:33 +00:00
Bruce Momjian b6f5676c60 Add entry:
> * Allow user-defined types to accept 'typmod' parameters
>   http://archives.postgresql.org/pgsql-hackers/2005-08/msg01142.php
>   http://archives.postgresql.org/pgsql-hackers/2005-09/msg00012.php
2006-06-14 17:51:55 +00:00
Tom Lane 2193beb761 Further thoughts about lo_export/lo_import error handling: if one of
the lower-level large object functions fails, it will have already set
a suitable error message --- probably something from the backend ---
and it is not useful to overwrite that with a generic 'error while
reading large object' message.  So remove redundant messages.
2006-06-14 17:49:25 +00:00
Tom Lane f3164c0200 Clean up psql's control-C handling to avoid longjmp'ing out of random
places --- that risks corrupting data structures, losing sync with the
backend, etc.  We now longjmp only from calls to readline, fgets, and
fread, which we assume are coded to protect themselves against interrupts
at undesirable times.  This requires adding explicit tests for
cancel_pressed in long-running loops, but on the whole it's far cleaner.
Martijn van Oosterhout and Tom Lane.
2006-06-14 16:49:03 +00:00
Tom Lane ace93353ea Improve error detection and recovery in lo_import()/lo_export().
Problems noted while experimenting with new control-C code for psql.
2006-06-14 01:28:55 +00:00
Tom Lane 067e40cc6d Do a CHECK_FOR_INTERRUPTS immediately before terminating a fastpath
function call.  Previously, there may have been no CHECK_FOR_INTERRUPTS
at all in the fastpath code path, making it impossible to cancel an
operation such as \lo_import externally.  This addition doesn't ensure
you can cancel, since your SIGINT may arrive while the backend is idle
waiting for the client, but it gives the largest window we can easily
provide.  Noted while experimenting with new control-C code for psql.
2006-06-14 01:24:14 +00:00
Bruce Momjian aa30e0e555 Remove:
< 	o %Add CSV output format
2006-06-13 21:08:22 +00:00
Bruce Momjian 07c25723da Add BY clause to PL/PgSQL FOR loop, to control the iteration increment.
Jaime Casanova
2006-06-12 16:45:30 +00:00
Bruce Momjian e6a7b01930 Avoid use of C commment inside C comment from recent Win32 int overflow patch. 2006-06-12 16:28:52 +00:00
Bruce Momjian 27bff7502f Prevent Win32 from displaying a popup box on backend crash. Instead let
the postmaster deal with it.

Magnus Hagander
2006-06-12 16:17:20 +00:00
Bruce Momjian 11a0c1de9f Add URL for bitmap AM:
>   http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php
2006-06-12 16:15:07 +00:00
Bruce Momjian 9fc6f4e1ae Win32 can't catch the exception thrown by INT_MIN / -1 or INT_MIN * -1,
so on that platform we test for those before the computation and throw
an "out of range" error.

Backpatch to 8.1.X.
2006-06-12 16:09:11 +00:00
Tom Lane e71e02d926 Minor code cleanup: make the WIN32 case less gratuitously different from
the other platform-specific cases in ps_status.
2006-06-12 02:39:49 +00:00
Tom Lane e2e2a9db4c Code review for psql multiline history patch(es). Fix memory leak,
failure to enter commands in history if canceled by control-C, other
infelicities.
2006-06-11 23:06:00 +00:00
Tom Lane bf64a37909 Fix Assert failure when a fastpath function call is attempted inside an
already-aborted transaction block.  GetSnapshotData throws an Assert if
not in a valid transaction; hence we mustn't attempt to set a snapshot
for the function until after checking for aborted transaction.  This is
harmless AFAICT if Asserts aren't enabled (GetSnapshotData will compute
a bogus snapshot, but it doesn't matter since HandleFunctionRequest will
throw an error shortly anywy).  Hence, not a major bug.

Along the way, add some ability to log fastpath calls when statement
logging is turned on.  This could probably stand to be improved further,
but not logging anything is clearly undesirable.

Backpatched as far as 8.0; bug doesn't exist before that.
2006-06-11 15:49:28 +00:00
Bruce Momjian 807bfa581c Remove pg_dump wording:
<   pg_get_tabledef(), pg_get_domaindef(), pg_get_functiondef(), and
<   make use of them in pg_dump
>   pg_get_tabledef(), pg_get_domaindef(), pg_get_functiondef()
2006-06-10 23:33:27 +00:00
Bruce Momjian 0d001c86f8 Add:
<   pg_get_tabledef(), pg_get_domaindef(), pg_get_functiondef()
>   pg_get_tabledef(), pg_get_domaindef(), pg_get_functiondef(), and
>   make use of them in pg_dump
2006-06-10 23:17:21 +00:00
Tom Lane b773987fc2 Repair remarkably-inefficient query for dumping large object comments: it
was invoking obj_description() for each large object chunk, instead of once
per large object.  This code is new as of 8.1, which may explain why the
problem hadn't been noticed already.
2006-06-09 19:46:09 +00:00
Tom Lane 5de0cbdf0c Revert sampling patch for EXPLAIN ANALYZE; it turns out to be too unreliable
because node timing is much less predictable than the patch expects.  I kept
the API change for InstrStopNode, however.
2006-06-09 19:30:56 +00:00
Bruce Momjian 9143144935 Cleanups:
< 	* Allow a database in tablespace t1 with tables created in
> 	o Allow a database in tablespace t1 with tables created in
125c125
< 	* Allow reporting of which objects are in which tablespaces
> 	o Allow reporting of which objects are in which tablespaces
593c593
< 	* Allow GRANT/REVOKE permissions to be inherited by objects based on
> 	o Allow GRANT/REVOKE permissions to be inherited by objects based on
596c596
< 	* Allow SERIAL sequences to inherit permissions from the base table?
> 	o Allow SERIAL sequences to inherit permissions from the base table?
2006-06-09 18:41:57 +00:00
Bruce Momjian c0ba4829a9 Cleanup:
< * -%Allow pooled connections to list all prepared statements
> * -Allow pooled connections to list all prepared statements
2006-06-09 18:12:29 +00:00
Teodor Sigaev 04e9704b9e Now ispell dictionary can eat dictionaries in MySpell format,
used by OpenOffice. Dictionaries are placed at
http://lingucomponent.openoffice.org/spell_dic.html
Dictionary automatically recognizes format of files.

Warning. MySpell's format has limitation with compound
word support: it's impossible to mark affix as
compound-only affix. So for norwegian, german etc
languages it's recommended to use original ispell format.
For that reason I don't want to remove my2ispell
scripts, it's has workaround at least for norwegian language.
2006-06-09 13:25:59 +00:00
Bruce Momjian 1a1326d64d Add URL.
< 	  the insert.
> 	  the insert.
> 	  http://archives.postgresql.org/pgsql-patches/2005-07/msg00568.php
2006-06-09 02:11:10 +00:00
Bruce Momjian fa23204c5d Update:
< * Add SQL99 WITH RECURSIVE (hierarchical) queries to SELECT
> * Add SQL:2003 WITH RECURSIVE (hierarchical) queries to SELECT
2006-06-09 01:02:22 +00:00
Bruce Momjian 2f12903eb9 Remove:
< * Rename some /contrib modules from pg* to pg_*
2006-06-09 01:00:36 +00:00