Commit Graph

4695 Commits

Author SHA1 Message Date
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