Commit Graph

4880 Commits

Author SHA1 Message Date
Bruce Momjian 342e3b06f8 Fix markup 2004-06-12 04:02:53 +00:00
Bruce Momjian a1c4b9efe4 Update release notes for 7.4.3. 2004-06-12 03:54:51 +00:00
Tom Lane 7643bed58e When using extended-query protocol, postpone planning of unnamed statements
until Bind is received, so that actual parameter values are visible to the
planner.  Make use of the parameter values for estimation purposes (but
don't fold them into the actual plan).  This buys back most of the
potential loss of plan quality that ensues from using out-of-line
parameters instead of putting literal values right into the query text.

This patch creates a notion of constant-folding expressions 'for
estimation purposes only', in which case we can be more aggressive than
the normal eval_const_expressions() logic can be.  Right now the only
difference in behavior is inserting bound values for Params, but it will
be interesting to look at other possibilities.  One that we've seen
come up repeatedly is reducing now() and related functions to current
values, so that queries like ... WHERE timestampcol > now() - '1 day'
have some chance of being planned effectively.

Oliver Jowett, with some kibitzing from Tom Lane.
2004-06-11 01:09:22 +00:00
Bruce Momjian 6cc4175b25 Attached is a patch that takes care of the PATHSEP issue. I made a more
extensive change then what was suggested. I found the file path.c that
contained a lot of "Unix/Windows" agnostic functions so I added a function
there instead and removed the PATHSEP declaration in exec.c altogether. All
to keep things from scattering all over the code.

I also took the liberty of changing the name of the functions
"first_path_sep" and "last_path_sep". Where I come from (and I'm apparently
not alone given the former macro name PATHSEP), they should be called
"first_dir_sep" and "last_dir_sep". The new function I introduced, that
actually finds path separators, is now the "first_path_sep". The patch
contains changes on all affected places of course.

I also changed the documentation on dynamic_library_path to reflect the
chagnes.

Thomas Hallgren
2004-06-10 22:26:24 +00:00
Bruce Momjian 387b38bec4 Done:
> * -Print table names with constraint names in error messages, or make constraint
2004-06-10 19:04:49 +00:00
Bruce Momjian 93db6f6ae2 Reword:
< * Allow hash buckets to fill disk pages, rather than being sparse
> * Pack hash index buckets onto disk pages more efficiently
2004-06-10 11:56:27 +00:00
Bruce Momjian 13c30084f6 Add:
> * Allow pg_dump to use multiple -t and -n switches
2004-06-10 04:33:51 +00:00
Bruce Momjian 741681b7b2 Modify:
< * Order heap pointers on hash index pages by hash value and ctid
> * Allow hash buckets to fill disk pages, rather than being sparse
2004-06-10 04:06:21 +00:00
Bruce Momjian c7099997ac Add Brazilian version of FAQ.
Euler Taveira de Oliveira
2004-06-10 03:46:11 +00:00
Bruce Momjian babd02af5a Add:
> * Order heap pointers on hash index pages by hash value and ctid
2004-06-10 03:45:30 +00:00
Tom Lane 7e64dbc6b5 Support assignment to subfields of composite columns in UPDATE and INSERT.
As a side effect, cause subscripts in INSERT targetlists to do something
more or less sensible; previously we evaluated such subscripts and then
effectively ignored them.  Another side effect is that UPDATE-ing an
element or slice of an array value that is NULL now produces a non-null
result, namely an array containing just the assigned-to positions.
2004-06-09 19:08:20 +00:00
Bruce Momjian 69616f96ec Add:
> * Add ON COMMIT capability to CREATE TABLE AS SELECT
2004-06-09 03:15:51 +00:00
Bruce Momjian cd8b0fc5f1 Change PGETC to PGSYSCONFDIR and PGLOCALE to PGLOCALEDIR, per Peter. 2004-06-08 13:49:23 +00:00
Bruce Momjian 9136613803 Add start/stop times for pg_dump/pg_dumpall when verbose output is used. 2004-06-07 20:35:57 +00:00
Bruce Momjian 613c684a60 Update date. 2004-06-07 15:11:23 +00:00
Tom Lane 982d005d62 Some preliminary documentation for composite-type stuff. 2004-06-07 04:04:47 +00:00
Tom Lane c541bb86e9 Infrastructure for I/O of composite types: arrange for the I/O routines
of a composite type to get that type's OID as their second parameter,
in place of typelem which is useless.  The actual changes are mostly
centralized in getTypeInputInfo and siblings, but I had to fix a few
places that were fetching pg_type.typelem for themselves instead of
using the lsyscache.c routines.  Also, I renamed all the related variables
from 'typelem' to 'typioparam' to discourage people from assuming that
they necessarily contain array element types.
2004-06-06 00:41:28 +00:00
Bruce Momjian 768916d753 This is a small fix in FAQ. It just clean up some old comments and
change an old -not-working piece of code.
2004-06-04 04:09:40 +00:00
Bruce Momjian bf2a115f2f Remove dash in pg_ctl signal name. It broke with getopt_long dash
reorganization processing, and it is clearer without the dash anyway.
2004-06-04 04:05:36 +00:00
Bruce Momjian 6870843339 Add PGETC (for pg_service.conf) and PGLOCALE (for locale dir)
environment variable processing to libpq.

The patch also adds code to our client apps so we set the environment
variable directly based on our binary location, unless it is already
set. This will allow our applications to emit proper locale messages
that are generated in libpq.
2004-06-03 00:07:38 +00:00
Bruce Momjian 70f5a87ecc Small patch that adds some documentation for the area() function.
Specifically, point out that intersecting points in a path will yield
(most likely), unexpected results.  Visually these are identical paths,
but mathematically they're not the same.  Ex:

  area |                                           plan
------
+-----------------------------------------------------------------------
-------------------
    -0 | ((0,0),(0,1),(2,1),(2,2),(1,2),(1,0),(0,0))
     2 | ((0,0),(0,1),(1,1),(1,2),(2,2),(2,1),(1,1),(1,0),(0,0))

The current algorithm for area(PATH) is very quick, but only handles
non-intersecting paths.  I'm going to work on two other functions for
the PATH data type that determines if a PATH is intersecting or not,
and a function that returns the area() for an intersecting PATH.  The
intersecting area() function will be considerably slower (I think it's
going to be O(n!) or worse instead of the current O(n), but that comes
with the territory).

Sean Chittenden
2004-06-02 21:34:49 +00:00
Bruce Momjian 36ae5efab1 Improve without cluster wording. 2004-06-02 21:04:40 +00:00
Bruce Momjian 1cdc58722c OK, here's the final version of ALTER TABLE ... SET WITHOUT CLUSTER.
Has docs + regression test.

Christopher Kings-Lynne
2004-06-02 21:01:10 +00:00
Tom Lane 4b2dafcc0b Align GRANT/REVOKE behavior more closely with the SQL spec, per discussion
of bug report #1150.  Also, arrange that the object owner's irrevocable
grant-option permissions are handled implicitly by the system rather than
being listed in the ACL as self-granted rights (which was wrong anyway).
I did not take the further step of showing these permissions in an
explicit 'granted by _SYSTEM' ACL entry, as that seemed more likely to
bollix up existing clients than to do anything really useful.  It's still
a possible future direction, though.
2004-06-01 21:49:23 +00:00
Bruce Momjian a1bd1d70d6 Update pg_dump -v comments to mention additional comments in dump file. 2004-05-31 13:37:52 +00:00
Bruce Momjian f024086db3 Done:
> 	o -Allow Java server-side programming
2004-05-31 02:58:43 +00:00
Bruce Momjian 95cdafd333 Remove pljava todo info. 2004-05-31 02:58:09 +00:00
Bruce Momjian d157b7bbc7 Document new pg_ctl 'kill' command, specificially for Win32. 2004-05-27 03:50:25 +00:00
Tom Lane c792cbcc26 Recommend ALTER TABLE ... TYPE as the best way to reclaim space occupied by deleted columns. The old method involving UPDATE and VACUUM FULL will be considerably less efficient. 2004-05-27 03:30:11 +00:00
Neil Conway 92b0b080eb Add an index entry for "Performance Tips". Patch from Alvaro Herrera. 2004-05-27 01:00:40 +00:00
Bruce Momjian ffef9b8c50 AIX doc addition:
> FWIW, the section on configuring kernel resources under various
> Unixen[1] doesn't have any documentation for AIX. If someone out there
> knows which knobs need to be tweaked, would they mind sending in a doc
> patch? (Or just specifying what needs to be done, and I'll add the
> SGML.)

After verifying that nobody wound up messing with the kernel
parameters, here's a docs patch...

 Chris Browne
2004-05-26 18:51:43 +00:00
Bruce Momjian 97d625dd1c *) inet_(client|server)_(addr|port)() and necessary documentation for
the four functions.


> Also, please justify the temp-related changes.  I was not aware that we
> had any breakage there.

patch-tmp-schema.txt contains the following bits:

*) Changes pg_namespace_aclmask() so that the superuser is always able
to create objects in the temp namespace.
*) Changes pg_namespace_aclmask() so that if this is a temp namespace,
objects are only allowed to be created in the temp namespace if the
user has TEMP privs on the database.  This encompasses all object
creation, not just TEMP tables.
*) InitTempTableNamespace() checks to see if the current user, not the
session user, has access to create a temp namespace.

The first two changes are necessary to support the third change.  Now
it's possible to revoke all temp table privs from non-super users and
limiting all creation of temp tables/schemas via a function that's
executed with elevated privs (security definer).  Before this change,
it was not possible to have a setuid function to create a temp
table/schema if the session user had no TEMP privs.

patch-area-path.txt contains:

*) Can now determine the area of a closed path.


patch-dfmgr.txt contains:

*) Small tweak to add the library path that's being expanded.

I was using $lib/foo.so and couldn't easily figure out what the error
message, "invalid macro name in dynamic library path" meant without
looking through the source code.  With the path in there, at least I
know where to start looking in my config file.

Sean Chittenden
2004-05-26 18:35:51 +00:00
Bruce Momjian 8096fe45ce The added aggregates are:
(1) boolean-and and boolean-or aggregates named bool_and and bool_or.
    they (SHOULD;-) correspond to standard sql every and some/any aggregates.
    they do not have the right name as there is a problem with
    the standard and the parser for some/any. Tom also think that
    the standard name is misleading because NULL are ignored.
    Also add 'every' aggregate.

(2) bitwise integer aggregates named bit_and and bit_or for
    int2, int4, int8 and bit types. They are not standard, but I find
    them useful. I needed them once.


The patches adds:

- 2 new very short strict functions for boolean aggregates in
  src/backed/utils/adt/bool.c,
  src/include/utils/builtins.h and src/include/catalog/pg_proc.h

- the new aggregates declared in src/include/catalog/pg_proc.h and
  src/include/catalog/pg_aggregate.h

- some documentation and validation about these new aggregates.

Fabien COELHO
2004-05-26 15:26:28 +00:00
Bruce Momjian 3dc37cd8d6 The patch adresses the TODO list item "Allow external interfaces to
extend the GUC variable set".

Plugin modules like the pl<lang> modules needs a way to declare
configuration parameters. The postmaster has no knowledge of such
modules when it reads the postgresql.conf file. Rather than allowing
totally unknown configuration parameters, the concept of a variable
"class" is introduced. Variables that belongs to a declared classes will
create a placeholder value of string type and will not generate an
error. When a module is loaded, it will declare variables for such a
class and make those variables "consume" any placeholders that has been
defined. Finally, the module will generate warnings for unrecognized
placeholders defined for its class.

More detail:
The design is outlined after the suggestions made by Tom Lane and Joe
Conway in this thread:

http://archives.postgresql.org/pgsql-hackers/2004-02/msg00229.php

A new string variable 'custom_variable_classes' is introduced. This
variable is a comma separated string of identifiers. Each identifier
denots a 'class' that will allow its members to be added without error.
This variable must be defined in postmaster.conf.

The lexer (guc_file.l) is changed so that it can accept a qualified name
in the form <ID>.<ID> as the name of a variable. I also changed so that
the 'custom_variable_classes', if found, is added first of all variables
in order to remove the order of declaration issue.

The guc_variables table is made more dynamic. It is originally created
with 20% slack and can grow dynamically. A capacity is introduced to
avoid resizing every time a new variable is added. guc_variables and
num_guc_variables becomes static (hidden).

The GucInfoMain now uses the new function get_guc_variables() and
GetNumConfigOptions  instead or using the guc_variables directly.

The find_option() function, when passed a missing name, will check if
the name is qualified. If the name is qualified and if the qualifier
denotes a class included in the 'custom_variable_classes', a placeholder
variable will be created. Such a placeholder will not participate in a
list operation but will otherwise function as a normal string variable.

Define<type>GucVariable() functions will be added, one for each variable
type. They are inteded to be used by add-on modules like the pl<lang>
mappings. Example:

extern void DefineCustomBoolVariable(
         const char* name,
         const char* short_desc,
         const char* long_desc,
         bool* valueAddr,
         GucContext context,
         GucBoolAssignHook assign_hook,
         GucShowHook show_hook);

(I created typedefs for the assign-hook and show-hook functions). A call
to these functions will define a new GUC-variable. If a placeholder
exists it will be replaced but it's value will be used in place of the
default value. The valueAddr is assumed ot point at a default value when
the define function is called. The only constraint that is imposed on a
Custom variable is that its name is qualified.

Finally, a function:

void EmittWarningsOnPlacholders(const char* className)

was added. This function should be called when a module has completed
its variable definitions. At that time, no placeholders should remain
for the class that the module uses. If they do, elog(INFO, ...) messages
will be issued to inform the user that unrecognized variables are
present.

Thomas Hallgren
2004-05-26 15:07:41 +00:00
Bruce Momjian cfbfdc557d This patch implement the TODO [ALTER DATABASE foo OWNER TO bar].
It was necessary to touch in grammar and create a new node to make home
to the new syntax. The command is also supported in E
CPG. Doc updates are attached too. Only superusers can change the owner
of the database. New owners don't need any aditional
privileges.

Euler Taveira de Oliveira
2004-05-26 13:57:04 +00:00
Bruce Momjian daac2d2c48 Update Russian FAQ.
Viktor Vislobokov
2004-05-24 15:14:52 +00:00
Neil Conway 2b3f6ecdf5 Clarify an entry in the 7.4 release notes. 2004-05-24 04:54:22 +00:00
Bruce Momjian ffd1880bb4 Add:
> * Allow GRANT/REVOKE permissions to be given to all schema objects with one command
2004-05-24 03:23:00 +00:00
Tom Lane 5fc1046f2f Fix broken markup. 2004-05-23 15:13:43 +00:00
Neil Conway bfa1171c84 Fix a few more minor errors in the 7.4 release notes. 2004-05-22 11:06:55 +00:00
Neil Conway 76e70108e7 Fix typo in an entry in the 7.4 release notes. 2004-05-22 09:48:15 +00:00
Tom Lane 63bd0db121 Integrate src/timezone library for all platforms. There is more we can
and should do now that we control our own destiny for timezone handling,
but this commit gets the bulk of the picayune diffs in place.
Magnus Hagander and Tom Lane.
2004-05-21 05:08:06 +00:00
Bruce Momjian 40296aa2ec Remove pyton, spell check fix:
> * Support composite types as table columns
286,289d286
< * Python
< 	o Allow users to register their own types with pg_
< 	o Allow SELECT to return a dictionary of dictionaries
< 	o Allow COPY BINARY FROM
456d452
< * Support composite types as table columns
2004-05-20 16:36:14 +00:00
Bruce Momjian 8027065660 Updates from Tom:
< Bracketed items "[]" have more detailed.
> Bracketed items "[]" have more detail.
35,36d34
< * Remove unreferenced table files and temp tables during database vacuum
<   or postmaster startup (Bruce)
68c66
< * Allow pg_dump to dump sequences using NO_MAXVALUE and NO_MINVALUE
> * -Allow pg_dump to dump sequences using NO_MAXVALUE and NO_MINVALUE
70c68
< * Prevent whole-row references from leaking memory, e.g. SELECT COUNT(tab.*)
> * -Prevent whole-row references from leaking memory, e.g. SELECT COUNT(tab.*)
76c74
< * Make LENGTH() of CHAR() not count trailing spaces
> * -Make LENGTH() of CHAR() not count trailing spaces
145c143
< * Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
> * -Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
179c177
< * Allow more ISOLATION LEVELS to be accepted, but issue a warning for them
> * -Allow more ISOLATION LEVELS to be accepted
186c184
< * Add GUC setting to make created tables default to WITHOUT OIDS
> * -Add GUC setting to make created tables default to WITHOUT OIDS
265d262
< * Allow fastpast to pass values in portable format
271c268
< * Move psql backslash database information into the backend, use nmumonic
> * Move psql backslash database information into the backend, use nmeumonic
275,283d271
< * JDBC
< 	o Comprehensive test suite. This may be available already.
< 	o JDBC-standard BLOB support
< 	o Error Codes (pending backend implementation)
< 	o Support both 'make' and 'ant'
< 	o Fix LargeObject API to handle OIDs as unsigned ints
< 	o Use cursors implicitly to avoid large results (see setCursorName())
< 	o Add LISTEN/NOTIFY support to the JDBC driver (Barry)
<
332c320
< * Have pg_dump -c clear the database using dependency information
> * -Have pg_dump -c clear the database using dependency information
367,368c355,356
< * Cache last known per-tuple offsets to speed long tuple access
< * Automatically place fixed-width, NOT NULL columns first in a table
> * Cache last known per-tuple offsets to speed long tuple access, adjusting
>   for NULLs and TOAST values
467c455,456
< * Change representation of whole-tuple parameters to functions
> * -Change representation of whole-tuple parameters to functions
> * Support composite types as table columns
478,479d466
< * Allow the regression tests to start postmaster with -i so the tests
<   can be run on systems that don't support unix-domain sockets
2004-05-20 15:57:26 +00:00
Bruce Momjian bb206b6dce Update SCO FAQ.
Larry Rosenman
2004-05-20 04:19:26 +00:00
Bruce Momjian 3e485d0ea1 Add:
> * Investigate SMP context switching issues
2004-05-20 04:10:44 +00:00
Bruce Momjian 4714dcb06c Remove item:
< * Allow col IS TRUE/FALSE use an index like col = TRUE/FALSE
2004-05-20 03:27:16 +00:00
Bruce Momjian 5f55347e33 Add:
> 	o Add default clustering to system tables
2004-05-20 02:58:18 +00:00
Bruce Momjian f92630bdca Add:
> 	o Add ALTER DOMAIN TYPE
2004-05-20 02:07:50 +00:00
Bruce Momjian 0ca0099139 Add:
> * Allow col IS TRUE/FALSE use an index like col = TRUE/FALSE
2004-05-20 02:01:00 +00:00
Bruce Momjian d5003e5221 Document &< and &> properly.
William White <bwhite@frognet.net>
2004-05-19 23:56:38 +00:00
Bruce Momjian 24a1fafc8d Clearify CHECK handling of unknown test values.
Karl O. Pinc
2004-05-19 23:10:43 +00:00
Bruce Momjian 952c772158 Done:
> * -Make pg_restore continue after errors, so it acts more like pg_dump scripts
2004-05-19 21:09:53 +00:00
Bruce Momjian 4c82cb9d40 Trim down relocatable docs, per Peter. 2004-05-18 21:46:25 +00:00
Bruce Momjian dcf459e662 Add some documentation on relocatable installs. 2004-05-18 20:34:01 +00:00
Bruce Momjian da401bd314 Add:
> * Allow binaries to be statically linked so they are more easily relocated
2004-05-18 16:06:08 +00:00
Bruce Momjian e30efa0da1 Update Russian FAQ.
Viktor Vislobokov
2004-05-18 13:18:30 +00:00
Bruce Momjian d14db1321b Add documentation that installations are relocatable unless configure
locations are overridden.
2004-05-17 16:06:25 +00:00
Bruce Momjian 2657c24b6d Reformat sgml doc paragraph. 2004-05-17 15:00:50 +00:00
Neil Conway 8295c27c89 Add documentation for the new "dollar quoting" feature, and update existing
examples to use dollar quoting when appropriate. Original patch from David
Fetter, additional work and editorializing by Neil Conway.
2004-05-16 23:22:08 +00:00
Neil Conway 2871f60f23 Change ln(), log(), power(), and sqrt() to emit the correct SQLSTATE
error codes for certain error conditions, as specified by SQL2003.
2004-05-16 23:18:55 +00:00
Bruce Momjian 335cf9ae7f Restore one mention of logrotate, per Peter. 2004-05-16 19:34:46 +00:00
Neil Conway 0079547bcb Implement the width_bucket() function, per SQL2003. This commit only adds
a variant of the function for the 'numeric' datatype; it would be possible
to add additional variants for other datatypes, but I haven't done so yet.

This commit includes regression tests and minimal documentation; if we
want developers to actually use this function in applications, we'll
probably need to document what it does more fully.
2004-05-14 21:42:30 +00:00
Bruce Momjian 19a495caaa Properly document rotatelogs, and add mention of it to pg_ctl manual page. 2004-05-14 20:01:19 +00:00
Neil Conway 0cb27df5c6 Improve documentation for SQLSTATE error codes, per recent thread on
-patches.
2004-05-14 18:04:02 +00:00
Bruce Momjian 3bfd4d9284 Remove:
< 	o Add PL/PHP (Joe)
2004-05-12 04:10:41 +00:00
Bruce Momjian 270c9aa34a Add DELETE:
> * Add MERGE command that does UPDATE/DELETE, or on failure, INSERT (rules, triggers?)
2004-05-11 20:23:05 +00:00
Bruce Momjian f739deb50f Add mention of rules/triggers:
> * Add MERGE command that does UPDATE, or on failure, INSERT (rules, triggers?)
2004-05-11 13:44:05 +00:00
Tom Lane 2f63232d30 Promote row expressions to full-fledged citizens of the expression syntax,
rather than allowing them only in a few special cases as before.  In
particular you can now pass a ROW() construct to a function that accepts
a rowtype parameter.  Internal generation of RowExprs fixes a number of
corner cases that used to not work very well, such as referencing the
whole-row result of a JOIN or subquery.  This represents a further step in
the work I started a month or so back to make rowtype values into
first-class citizens.
2004-05-10 22:44:49 +00:00
Neil Conway 9a939886ac Fix typo. 2004-05-10 21:08:28 +00:00
Bruce Momjian b071a40068 Add:
> * Add MERGE command that does UPDATE, or on failure, INSERT
2004-05-10 03:58:19 +00:00
Bruce Momjian 1fe11fad54 Fix typo. 2004-05-08 02:13:31 +00:00
Bruce Momjian 97c7cb0930 Uppercase keyword for ecpg. 2004-05-07 02:40:43 +00:00
Bruce Momjian 4d46274b33 Done:
> 	o -ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence because
2004-05-06 19:32:09 +00:00
Bruce Momjian 22a2c4b576 Erase MD5 user passwords when a user is renamed because the username is
used as salt for the MD5 password.
2004-05-06 16:59:16 +00:00
Bruce Momjian d8f6973df3 Update todo/faq timestamps 2004-05-06 16:49:13 +00:00
Bruce Momjian a4ab5bae42 Done:
o -ALTER TABLE ADD COLUMN does not honor DEFAULT and non-CHECK CONSTRAINT
        o -ALTER TABLE ADD COLUMN column DEFAULT should fill existing
          rows with DEFAULT value
        o -Allow ALTER TABLE to modify column lengths and change to binary
          compatible types

Remove:

        o Allow columns to be reordered using ALTER ... POSITION i col1 [,col2];
          have SELECT * and INSERT honor such ordering
2004-05-05 14:36:20 +00:00
Neil Conway 3b8151a5ee Fix a typo in the documentation. 2004-05-05 09:33:38 +00:00
Tom Lane 077db40fa1 ALTER TABLE rewrite. New cool stuff:
* ALTER ... ADD COLUMN with defaults and NOT NULL constraints works per SQL
spec.  A default is implemented by rewriting the table with the new value
stored in each row.

* ALTER COLUMN TYPE.  You can change a column's datatype to anything you
want, so long as you can specify how to convert the old value.  Rewrites
the table.  (Possible future improvement: optimize no-op conversions such
as varchar(N) to varchar(N+1).)

* Multiple ALTER actions in a single ALTER TABLE command.  You can perform
any number of column additions, type changes, and constraint additions with
only one pass over the table contents.

Basic documentation provided in ALTER TABLE ref page, but some more docs
work is needed.

Original patch from Rod Taylor, additional work from Tom Lane.
2004-05-05 04:48:48 +00:00
Neil Conway 4ef8b2f901 Fix obscure typo in 7.4.0 release notes. 2004-05-03 08:47:54 +00:00
Bruce Momjian 7ebd5dafd8 Assign item:
< 	o Add ALTER TABLE table SET WITHOUT CLUSTER
> 	o Add ALTER TABLE table SET WITHOUT CLUSTER (Christopher)
2004-05-02 12:27:45 +00:00
Bruce Momjian 846cd0f1c2 Update TODO item:
o Add ALTER TABLE table SET WITHOUT CLUSTER
2004-05-02 12:27:00 +00:00
Bruce Momjian 1a273556a3 Update Japanese FAQ.
Jun Kuwamura
2004-05-01 01:27:03 +00:00
Tom Lane f378288e3b Minor copy-editing. 2004-04-29 04:37:09 +00:00
Bruce Momjian a3b0c90e24 Fix typo:
<   columns and indexes with many duplicate keys
2004-04-28 16:35:36 +00:00
Neil Conway a3015829ee Fix typo in libpq docs. 2004-04-24 22:58:40 +00:00
Neil Conway f0c3a09ab3 Document that PQoidValue(), PQcmdTuples(), and PQoidStatus() now work
when the command that generated the PGresult was an EXECUTE of an
appropriate prepared statement.
2004-04-24 22:53:44 +00:00
Bruce Momjian f5dd5bf297 Add mention to run thread test program if user is experiencing problems
with threaded applications.
2004-04-24 00:14:28 +00:00
Neil Conway fc7fd50182 Add ceiling() as an alias for ceil(), and power() as an alias for pow().
Regression tests and documentation have both been updated.

SQL2003 requires that both ceiling() and ceil() be present, so I have
documented both spellings. SQL2003 doesn't mention pow() as far as I
can see, so I decided to replace pow() with power() in the documentation:
there is little reason to encourage the continued usage of a function
that isn't compliant with the standard, given a standard-compliant
alternative.

RELEASE NOTES: should state that pow() is considered deprecated
(although I don't see the need to ever remove it.)
2004-04-23 20:32:20 +00:00
Neil Conway 0fa2afa93a Make psql's \d+ command indicate whether the table in question
contains OIDs. Also, minor documentation improvements to the
psql reference page.
2004-04-22 17:38:16 +00:00
Bruce Momjian 65b020bd61 Fix filename mention in psqlrc.sample file. 2004-04-22 14:33:49 +00:00
Tom Lane 19f1649bed Put information about tag in Outputs section, where it belongs. 2004-04-22 11:46:22 +00:00
Peter Eisentraut c16fa67c87 Fix typo 2004-04-22 08:36:48 +00:00
Neil Conway 2ff4e44043 Improvements to the backup & restore documentation. 2004-04-22 07:02:36 +00:00
Bruce Momjian e3391133ae Update EXECUTE docs to mention tag matches prepared statement.
Update log_statement to more clearly state it doesn't filter based on
the statement type of the prepared statement.
2004-04-22 04:18:41 +00:00
Bruce Momjian be6bbcef56 Add global psql config file, psql.rc.sample. 2004-04-22 01:53:37 +00:00
Neil Conway 4906841901 Minor improvement to CREATE AGGREGATE docs: add an xref to the docs for
builtin aggregate functions.
2004-04-21 21:52:41 +00:00
Peter Eisentraut aeee856564 New link for Solaris IPC article 2004-04-21 13:18:28 +00:00
Bruce Momjian 49d3d9cf40 Change COPY CSV keyword to be:
FORCE QUOTE to force quotes
	FORCE NOT NULL to quote null input values
2004-04-21 00:34:18 +00:00
Bruce Momjian 2d1221bf89 Done:
< * Add NO WAIT option to various SQL commands
> * -Add NO WAIT LOCKs
2004-04-20 20:16:30 +00:00
Bruce Momjian 6022a7d72f Add doc mention that:
process directly.  Some parameters can only be set at server start;
    any changes to their entries in the configuration file will be ignored
    until the server is restarted.
2004-04-20 16:56:19 +00:00
Bruce Momjian cfb8d57ba1 Add:
> * Allow AFTER triggers on system tables
2004-04-20 14:03:30 +00:00
Bruce Momjian 8149029162 Improve IS NULL partial index wording. 2004-04-20 12:53:28 +00:00
Bruce Momjian 8b10da1056 Done:
> * -Exit postmaster if postgresql.conf can not be opened
2004-04-20 04:26:27 +00:00
Bruce Momjian bb18b47390 Document partial indexes for IS NULL lookups. 2004-04-20 04:25:47 +00:00
Bruce Momjian 2f2a3439a5 Remove additional tcl doc mention. 2004-04-20 01:14:55 +00:00
Bruce Momjian c310d28766 Remove TCL docs. 2004-04-20 01:11:49 +00:00
Bruce Momjian 6ef77149f7 > >> My question is whether postgres can index null values, and if not, do I
> >> have to accept a full table scan when locating records.
> >
> > It indexes them, but "is null" is not an indexable operator, so you
> > can't directly solve the above with a 3-column index.  What you can do
> > instead is use a partial index, for instance
> >
> > create index i on CUSTOMER.WCCustOrderStatusLog (WCOrderStatusID)
> > where Acknowledged is null and Processing is null;
>
> That's a very nifty trick and exactly the sort of answer I was after!

Add CREATE INDEX doc mention of using partial indexes for IS NULL
indexing;  idea from Tom.
2004-04-20 01:00:26 +00:00
Bruce Momjian d1b3915ce1 In reading the 7.4.2 docs, the sql reference page for PREPARE doesn't
reference DEALLOCATE in any way. It points to EXECUTE, but not to
DEALLOCATE. Suggested fix:

... This also means that a single  prepared statement cannot be used by
multiple simultaneous database clients; however, each client can create
their own prepared statement  to use. The prepared statement can be
manually cleaned up using the DEALLOCATE command.

James Robinson
2004-04-19 23:36:48 +00:00
Bruce Momjian 862b20b382 Complete TODO item:
o -Allow dump/load of CSV format

This adds new keywords to COPY and \copy:

        CSV - enable CSV mode (comma separated variable)
        QUOTE - specify quote character
        ESCAPE - specify escape character
        FORCE - force quoting of specified column
	LITERAL - suppress null comparison for columns

Doc changes included.  Regression updates coming from Andrew.
2004-04-19 17:22:31 +00:00
Bruce Momjian 83ab1c0475 Done:
> 	o -Allow dump/load of CSV format
2004-04-19 17:03:13 +00:00
Bruce Momjian 7931a8fdd1 Fix typo:
< * -Allow psql \du to show groups, and add \dg for groups
> * -Allow psql \du to show users, and add \dg for groups
2004-04-19 15:37:56 +00:00
Bruce Momjian 77c7e8bcb8 Clarify meaning of second DateStyle value. 2004-04-15 04:46:18 +00:00
Bruce Momjian 18229e080c Update name:
< * Alvaro Herrera <alvherre@dcc.uchile.cl>
> * Alvaro is Alvaro Herrera <alvherre@dcc.uchile.cl>
2004-04-14 19:15:27 +00:00
Bruce Momjian 76e953bd70 Update owners of items:
< * Add the concept of dataspaces/tablespaces [tablespaces]
> * Add the concept of dataspaces/tablespaces [tablespaces] (Gavin)
167c167
< * Allow savepoints / nested transactions [transactions] (Bruce)
> * Allow savepoints / nested transactions [transactions] (Alvaro)
240c240
< 	o Allow Java server-side programming [java]
> 	o Allow Java server-side programming [java] (Dave)
496a497
> * Alvaro Herrera <alvherre@dcc.uchile.cl>
2004-04-14 18:33:03 +00:00
Bruce Momjian abdabeb995 Change psql \copy stdin/stdout to read from command input/output.
Add pstdin/pstdout to read from psql's stdin/stdout.

BACKWARD INCOMPATIBLE CHANGE
2004-04-12 15:58:52 +00:00
Bruce Momjian 7b3189c185 > > This update fixes a few small typos in names,
> > pronouns and formatting in the Russian FAQ.

Serguei Mokhov
2004-04-12 03:22:20 +00:00
Bruce Momjian 1934055cbe Please find a small patch to fix the brain damage "century" and
"millennium" date part implementation in postgresql, both in the code
and the documentation, so that it conforms to the official definition.
If you do not agree with the official definition, please send your
complaint to "pope@vatican.org". I'm not responsible for them;-)

With the previous version, the centuries and millenniums had a wrong
number and started the wrong year. Moreover century number 0, which does
not exist in reality, lasted 200 years. Also, millennium number 0 lasted
2000 years.

If you want postgresql to have it's own definition of "century" and
"millennium" that does not conform to the one of the society, just give
them another name. I would suggest "pgCENTURY" and "pgMILLENNIUM";-)

IMO, if someone may use the options, it means that postgresql is used for
historical data, so it make sense to have an historical definition. Also,
I just want to divide the year by 100 or 1000, I can do that quite easily.

BACKWARD INCOMPATIBLE CHANGE

Fabien Coelho - coelho@cri.ensmp.fr
2004-04-10 18:02:59 +00:00
Bruce Momjian 296f485492 Remove libpgeasy and odbc doc reference in filelist.sgml --- removed to
gborg.
2004-04-09 18:03:13 +00:00
Bruce Momjian 14bd7a0181 Add SQL 2003 standards. 2004-04-07 23:32:30 +00:00
Bruce Momjian 9fa14b1ea0 Remove bad URL. 2004-04-07 22:02:03 +00:00
Bruce Momjian d17c92b24f Update:
< * Allow LOCALE on a per-column basis, default to ASCII
> * Allow locale to be set at database creation
> * Allow locale on a per-column basis, default to ASCII
> * Optimize locale to have minimal performance impact when not used (Peter E)
105d106
< * Optimize locale to have minimal performance impact when not used (Peter E)
111d111
< * Allow locale to be set at database creation
2004-04-07 19:14:21 +00:00
Bruce Momjian 75688a27d2 Add:
> * Allow locale to be set at database creation
2004-04-07 18:34:44 +00:00
Bruce Momjian f1d0269861 Done:
> * -Allow logging of only data definition(DDL), or DDL and modification statements

Add:
> * Add a session mode to warn about non-standard SQL usage
2004-04-07 17:04:45 +00:00
Bruce Momjian 58a1cb1024 Update FAQ_DEV. 2004-04-07 14:23:32 +00:00
Bruce Momjian 6a25c6e1d1 > >>1. change the type of "log_statement" option from boolean to string,
> >>with allowed values of "all, mod, ddl, none" with default "none".

OK, here is a patch that implements #1.  Here is sample output:

        test=> set client_min_messages = 'log';
        SET
        test=> set log_statement = 'mod';
        SET
        test=> select 1;
         ?column?
        ----------
                1
        (1 row)

        test=> update test set x=1;
        LOG:  statement: update test set x=1;
        ERROR:  relation "test" does not exist
        test=> update test set x=1;
        LOG:  statement: update test set x=1;
        ERROR:  relation "test" does not exist
        test=> copy test from '/tmp/x';
        LOG:  statement: copy test from '/tmp/x';
        ERROR:  relation "test" does not exist
        test=> copy test to  '/tmp/x';
        ERROR:  relation "test" does not exist
        test=> prepare xx as select 1;
        PREPARE
        test=> prepare xx as update x set y=1;
        LOG:  statement: prepare xx as update x set y=1;
        ERROR:  relation "x" does not exist
        test=> explain analyze select 1;;
                                             QUERY PLAN
        ------------------------------------------------------------------------------------
         Result  (cost=0.00..0.01 rows=1 width=0) (actual time=0.006..0.007 rows=1 loops=1)
         Total runtime: 0.046 ms
        (2 rows)

        test=> explain analyze update test set x=1;
        LOG:  statement: explain analyze update test set x=1;
        ERROR:  relation "test" does not exist
        test=> explain update test set x=1;
        ERROR:  relation "test" does not exist

It checks PREPARE and EXECUTE ANALYZE too.  The log_statement values are
'none', 'mod', 'ddl', and 'all'.  For 'all', it prints before the query
is parsed, and for ddl/mod, it does it right after parsing using the
node tag (or command tag for CREATE/ALTER/DROP), so any non-parse errors
will print after the log line.
2004-04-07 05:05:50 +00:00
Bruce Momjian 6165bbab8c Remove 'syslog' GUC variable, and add more logical 'log_destination'
variable to control logoutput location on Unix and Win32.

Magnus Hagander
2004-04-05 03:02:11 +00:00
Tom Lane 375369acd1 Replace TupleTableSlot convention for whole-row variables and function
results with tuples as ordinary varlena Datums.  This commit does not
in itself do much for us, except eliminate the horrid memory leak
associated with evaluation of whole-row variables.  However, it lays the
groundwork for allowing composite types as table columns, and perhaps
some other useful features as well.  Per my proposal of a few days ago.
2004-04-01 21:28:47 +00:00
Bruce Momjian 076055ed10 Add description of log_statement_stats's function (total statement stats
rather than per-stage stats).
2004-03-31 19:59:22 +00:00
Bruce Momjian a302b8e150 Back out tutorial changes:
---------------------------------------------------------------------------

1.  In keeping with the recent discussion that there should be more
said about views, stored procedures, and triggers, in the tutorial, I
have added a bit of verbiage to that end.

2.  Some formatting changes to the datetime discussion, as well as
addition of a citation of a relevant book on calendars.

Christopher Browne
2004-03-31 16:20:53 +00:00
Bruce Momjian 7d15b90e5b Add psql backslash command discussion. 2004-03-31 01:05:54 +00:00
Bruce Momjian b5db560c7a Add:
* Move psql backslash database information into the backend, use
nmumonic commands? [psql]
2004-03-31 01:04:49 +00:00
Bruce Momjian 07ff3afa2a Remove:
* Prevent unneeded quoting in psql \d output using fmtId()
2004-03-31 01:01:38 +00:00
Bruce Momjian 7b43450931 Fix markup errors from recent patch. 2004-03-30 22:08:50 +00:00
Bruce Momjian aaad011940 1. In keeping with the recent discussion that there should be more
said about views, stored procedures, and triggers, in the tutorial, I
have added a bit of verbiage to that end.

2.  Some formatting changes to the datetime discussion, as well as
addition of a citation of a relevant book on calendars.

Christopher Browne
2004-03-30 21:58:20 +00:00
Bruce Momjian cf9c2be7e8 Add:
> * Add GUC variable to allow output of interval values in ISO8601 format
2004-03-30 21:51:41 +00:00
Bruce Momjian 45edc20283 Add mention of how to use \df to find functions using/returning specific
data types.
2004-03-30 15:54:33 +00:00
Bruce Momjian fd071bd478 Fix to_char for 1 BC. Previously it returned 1 AD.
Fix to_char(year) for BC dates.  Previously it returned one less than
the current year.

Add documentation mentioning that there is no 0 AD.
2004-03-30 15:53:18 +00:00
Bruce Momjian 80683f2a07 Update FAQ from Robert Treat 2004-03-29 05:07:20 +00:00
Neil Conway 1090aa8cc7 More cross-reference work, other minor SGML fixes and improvements. 2004-03-26 03:18:28 +00:00
Tom Lane 7a944e41b4 Convert some GUC variable references to links. 2004-03-25 18:57:57 +00:00
Tom Lane 8899a2aba9 Replace max_expr_depth parameter with a max_stack_depth parameter that
is measured in kilobytes and checked against actual physical execution
stack depth, as per my proposal of 30-Dec.  This gives us a fairly
bulletproof defense against crashing due to runaway recursive functions.
2004-03-24 22:40:29 +00:00
Bruce Momjian a09b9a36d3 Add:
* Have pg_dump use multi-statement transactions for INSERT dumps
2004-03-24 18:15:56 +00:00
Neil Conway ce5273757b Make a cross-reference in the ALTER TABLE ref page into a <xref>. 2004-03-24 09:49:20 +00:00
Neil Conway d6bc5944a0 Fix a minor typo in the log_line_prefix docs and make a couple other
tiny improvements.
2004-03-24 03:48:41 +00:00
Bruce Momjian 6daf396879 Add thread locking to SSL and Kerberos connections.
I have removed the docs mentioning that SSL and Kerberos are not
thread-safe.

Manfred Spraul
2004-03-24 03:45:00 +00:00
Bruce Momjian fcfa2c790a Document fallback to tcp/ip localhost connection from psql on ports
without unix domain sockets (win32).
2004-03-24 03:27:46 +00:00
Tom Lane 1c4da387ad PQresult should be PGresult. 2004-03-23 23:37:17 +00:00
Tom Lane 8ed89773c5 Fix small typo. 2004-03-23 22:57:09 +00:00
Tom Lane 121cf2b904 Repair misleading description of MOVE's command tag result. 2004-03-23 22:39:22 +00:00