Commit Graph

2081 Commits

Author SHA1 Message Date
Tom Lane eb3adab568 Provide an upgrade strategy for dump files containing functions declared
with OPAQUE.  CREATE LANGUAGE, CREATE TRIGGER, and CREATE TYPE will all
accept references to functions declared with OPAQUE --- but they will
issue a NOTICE, and will modify the function entries in pg_proc to have
the preferred type-safe argument or result types instead of OPAQUE.
Per recent pghackers discussions.
2002-09-21 18:39:26 +00:00
Peter Eisentraut bc49968764 Add more appropriate markup. 2002-09-21 18:32:54 +00:00
Peter Eisentraut de96cd5e3a Revision 2002-09-20 18:39:41 +00:00
Bruce Momjian 708a000efe Mention that pg_get_viewdef(name) is deprecated.
Rod Taylor
2002-09-20 03:44:06 +00:00
Bruce Momjian 674818dce8 This patch corrects a minor mis-statement in the CREATE DOMAIN docs,
pointed out by Chris KL on -hackers a little while ago -- NOT NULL !=
CHECK xxx IS NOT NULL.

Neil Conway
2002-09-20 03:39:15 +00:00
Tom Lane b26dfb9522 Extend pg_cast castimplicit column to a three-way value; this allows us
to be flexible about assignment casts without introducing ambiguity in
operator/function resolution.  Introduce a well-defined promotion hierarchy
for numeric datatypes (int2->int4->int8->numeric->float4->float8).
Change make_const to initially label numeric literals as int4, int8, or
numeric (never float8 anymore).
Explicitly mark Func and RelabelType nodes to indicate whether they came
from a function call, explicit cast, or implicit cast; use this to do
reverse-listing more accurately and without so many heuristics.
Explicit casts to char, varchar, bit, varbit will truncate or pad without
raising an error (the pre-7.2 behavior), while assigning to a column without
any explicit cast will still raise an error for wrong-length data like 7.3.
This more nearly follows the SQL spec than 7.2 behavior (we should be
reporting a 'completion condition' in the explicit-cast cases, but we have
no mechanism for that, so just do silent truncation).
Fix some problems with enforcement of typmod for array elements;
it didn't work at all in 'UPDATE ... SET array[n] = foo', for example.
Provide a generalized array_length_coerce() function to replace the
specialized per-array-type functions that used to be needed (and were
missing for NUMERIC as well as all the datetime types).
Add missing conversions int8<->float4, text<->numeric, oid<->int8.
initdb forced.
2002-09-18 21:35:25 +00:00
Peter Eisentraut da123b7c58 Update installation instructions and put mostly everything in one place.
Also, some editing in PL/Perl and PL/Python chapters.
2002-09-18 20:09:32 +00:00
Peter Eisentraut 0db8c41523 Remove pgeasy and odbc. 2002-09-18 20:07:15 +00:00
Bruce Momjian 445732a5ff Point out that CREATE INDEX uses sorts and hence sort_mem GUC parameter. 2002-09-17 21:41:47 +00:00
Peter Eisentraut 5ea9322872 Cast functions can be immutable or stable. 2002-09-15 13:04:16 +00:00
Tom Lane 1b69b122bb Some PL/PgSQL documentation improvements from Neil Conway. 2002-09-14 20:11:16 +00:00
Peter Eisentraut 49c86099f3 Shrink the pg_hba.conf and pg_ident.conf default files and move most of the
inline documentation to the main docs.
2002-09-14 18:35:46 +00:00
Peter Eisentraut 6d77f6e5fb Add more information about schemas. Combines some previously existing
material into the new location.
2002-09-12 22:05:36 +00:00
Bruce Momjian 81186865fe Joe Conway wrote:
> Hannu Krosing wrote:
 >
 >> It seems that my last mail on this did not get through to the list
 >> ;(
 >>
 >> Please consider renaming the new builtin function
 >> split(text,text,int)
 >>
 >> to something else, perhaps
 >>
 >> split_part(text,text,int)
 >>
 >> (like date_part)
 >>
 >> The reason for this request is that 3 most popular scripting
 >> languages (perl, python, php) all have also a function with similar
 >> signature, but returning an array instead of single element and the
 >> (optional) third argument is limit (maximum number of splits to
 >> perform)
 >>
 >> I think that it would be good to have similar function in (some
 >> future release of) postgres, but if we now let in a function with
 >> same name and arguments but returning a single string instead an
 >> array of them, then we will need to invent a new and not so easy to
 >> recognise name for the "real" split function.
 >>
 >
 > This is a good point, and I'm not opposed to changing the name, but
 > it is too bad your original email didn't get through before beta1 was
 >  rolled. The change would now require an initdb, which I know we were
 >  trying to avoid once beta started (although we could change it
 > without *requiring* an initdb I suppose).
 >
 > I guess if we do end up needing an initdb for other reasons, we
 > should make this change too. Any other opinions? Is split_part an
 > acceptable name?
 >
 > Also, if we add a todo to produce a "real" split function that
 > returns an array, similar to those languages, I'll take it for 7.4.

No one commented on the choice of name, so the attached patch changes
the name of split(text,text,int) to split_part(text,text,int) per
Hannu's recommendation above. This can be applied without an initdb if
current beta testers are advised to run:

   update pg_proc set proname = 'split_part' where proname = 'split';

in the case they want to use this function. Regression and doc fix is
also included in the patch.

Joe Conway
2002-09-12 00:21:25 +00:00
Bruce Momjian 6a5733a1ea Fix atan() description.
Bruno Wolff III
2002-09-11 02:56:46 +00:00
Bruce Momjian fe80b5ed8a Remove more references to pgaccess as a build target in docs. 2002-09-08 02:33:08 +00:00
Bruce Momjian 24507acc0b Changes to documentation and the regression tests for the default
NAMEDATALEN of 64.

Kris Jurka
2002-09-07 18:39:05 +00:00
Bruce Momjian fba5c7b944 Remove pgaccess from docs; not shipping it anymore. 2002-09-07 16:49:50 +00:00
Peter Eisentraut 40853dd445 Allow pg_dumpall to work with previous releases again. Don't pass the -c
option down to pg_dump, where it's useless, and clarify the meaning of -c
in the documentation.
2002-09-07 16:14:33 +00:00
Peter Eisentraut 38e444aae6 Make sure the pg_dump tar archiver can handle members larger than 2 GB, but
does not create members larger than allowed by the tar format.  Also, fix
the generation of the tar header to conform to POSIX.
2002-09-06 21:58:36 +00:00
Bruce Momjian b4295d052e Fix another typo. 2002-09-06 20:26:00 +00:00
Bruce Momjian 022eb280af Fix typo. 2002-09-06 20:08:06 +00:00
Bruce Momjian cd06c70d9a Missed mention of PGPASSWORDFILE. 2002-09-05 22:09:42 +00:00
Bruce Momjian 5fc10c3d17 Remove PGPASSWORDFILE and default to always trying $HOME/.pgpass.
Cleanup up memory allocation for $HOME in related psql places.

Update mention of $HOME/.pgpass in the docs;  add mention in pg_dumpall.
2002-09-05 22:05:50 +00:00
Peter Eisentraut 04604fd1a4 Fill in section on table modification. 2002-09-05 21:32:23 +00:00
Bruce Momjian 79ecb80c74 Brand 7.3. Ready for beta! 2002-09-04 07:23:04 +00:00
Bruce Momjian 4f1a32b37e Update new HISTORY file for 7.3! 2002-09-04 07:16:32 +00:00
Tom Lane d61de58906 Arrange for the default permissions on a database to allow temp table
creation to world, but disallow temp table creation in template1.  Per
latest round of pghackers discussion.
I did not force initdb, but the permissions lockdown on template1 will
not take effect unless you do one (or manually REVOKE TEMP ON DATABASE template1 FROM public).
2002-09-03 22:17:35 +00:00
Bruce Momjian bfd5854574 Fix SGML build failure. 2002-09-03 16:21:23 +00:00
Tom Lane 4a954ce79d Documentation improvements. 2002-09-03 01:11:37 +00:00
Tom Lane ab82bde7e0 Code review and documentation updates for indisclustered patch. 2002-09-03 01:04:41 +00:00
Tom Lane 8c8aa53953 pg_on_connection_loss command for libpgtcl. Patch from
Gerhard Hintermayer, revised and documented by Tom Lane.

This patch also fixes a 'must fix' bug: libpgtcl's LISTEN/NOTIFY
support was broken by the recent changes to the PGnotify structure.
Guess that change wasn't quite so safe as we thought.
2002-09-02 21:51:47 +00:00
Tom Lane b356b969ef Fix obsolete description of PGnotify struct. 2002-09-02 20:21:32 +00:00
Tom Lane 8f60f43f2e Department of second thoughts: make checks for replacing a view slightly
more flexible, and improve the error reporting.  Also, add documentation
for REPLACE RULE/VIEW.
2002-09-02 20:04:40 +00:00
Tom Lane 6dff9bc97d Fix broken markup. 2002-09-02 13:45:30 +00:00
Bruce Momjian 81efc82608 This patch fixes a minor inaccuracy in the documentation: NOT NULL is
not synonymous with CHECK (xxx IS NOT NULL) -- for example, consider
ALTER TABLE ADD PRIMARY KEY, which checks for 'NOT NULL', not a check
constraint.

Neil Conway
2002-09-02 06:20:53 +00:00
Bruce Momjian a12b4e279b I checked all the previous string handling errors and most of them were
already fixed by You. However there were a few left and attached patch
should fix the rest of them.

I used StringInfo only in 2 places and both of them are inside debug
ifdefs. Only performance penalty will come from using strlen() like all
the other code does.

I also modified some of the already patched parts by changing
snprintf(buf, 2 * BUFSIZE, ... style lines to
snprintf(buf, sizeof(buf), ... where buf is an array.

Jukka Holappa
2002-09-02 06:11:43 +00:00
Bruce Momjian e82bcba5e0 Here's a doc patch for the new string functions recently committed --
replace, split, and to_hex. The patch also moves encode and decode into
alphabetical order (since everything else in the table was).

Joe Conway
2002-09-02 05:53:23 +00:00
Bruce Momjian ab5fe2a91f Move pg_settings doc into the right section. 2002-09-02 05:52:34 +00:00
Bruce Momjian c7be7ffdb0 Here is a documentation patch for the pg_settings virtual table. If
there are no objections, please apply.

Joe Conway
2002-09-02 05:44:43 +00:00
Bruce Momjian 9fd842c4b2 Add GUC variable to print original query to the server logs when there
is an error, warning, etc.

Gavin Sherry
2002-09-02 05:42:54 +00:00
Tom Lane c7a165adc6 Code review for HeapTupleHeader changes. Add version number to page headers
(overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask,
per earlier discussion.  Simplify scheme for overlaying fields in tuple
header (no need for cmax to live in more than one place).  Don't try to
clear infomask status bits in tqual.c --- not safe to do it there.  Don't
try to force output table of a SELECT INTO to have OIDs, either.  Get rid
of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which
has already caused one recent failure.  Improve documentation.
2002-09-02 01:05:06 +00:00
Bruce Momjian 548d646e65 Add log_duration to GUC/postgresql.conf.
Rename debug_print_query to log_statement and rename show_query_stats to
show_statement_stats.
2002-09-01 23:26:06 +00:00
Tom Lane 470a1048ec plpgsql functions can return RECORD, per Neil Conway. 2002-09-01 16:28:06 +00:00
Tom Lane 1903221517 Minor copy-editing. 2002-09-01 02:37:02 +00:00
Bruce Momjian a03f9adb98 Remove mention of wal_files in a SHOW example. 2002-09-01 01:59:48 +00:00
Tom Lane 1bab464eb4 Code review for pg_locks feature. Make shmemoffset of PROCLOCK structs
available (else there's no way to interpret the list links).  Change
pg_locks view to show transaction ID locks separately from ordinary
relation locks.  Avoid showing N duplicate rows when the same lock is
held multiple times (seems unlikely that users care about exact hold
count).  Improve documentation.
2002-08-31 17:14:28 +00:00
Tom Lane 9c279355fb Updates to reflect availability of autocommit option. 2002-08-30 22:45:25 +00:00
Tom Lane 26993b2918 AUTOCOMMIT mode is now an available backend GUC variable; setting it
to false provides more SQL-spec-compliant behavior than we had before.
I am not sure that setting it false is actually a good idea yet; there
is a lot of client-side code that will probably be broken by turning
autocommit off.  But it's a start.

Loosely based on a patch by David Van Wie.
2002-08-30 22:18:07 +00:00
Tom Lane e2d156fa6e Add attisinherited column to pg_attribute; use it to guard against
column additions, deletions, and renames that would let a child table
get out of sync with its parent.  Patch by Alvaro Herrera, with some
kibitzing by Tom Lane.
2002-08-30 19:23:20 +00:00