Bruce Momjian [Tue, 20 Nov 2001 20:28:31 +0000 (20:28 +0000)]
Here's a patch adding documentation for the PQescapeBytea function to
libpq.sgml
I was trying (but gave up) to cross-reference back to the input escape
table in the User's Guide, but could not get the documentation to
compile with a cross-book xref (missing IDREF error). Can a cross-book
xref be done?
Bruce Momjian [Tue, 20 Nov 2001 15:42:44 +0000 (15:42 +0000)]
I've created a new section to func.sgml, "Binary String Functions and
Operators", plagiarized shamelessly from the "String Functions and
Operators" section. There were enough differences that it made sense (at
least to me) to give this its own section instead of cramming it in with
normal string functions. This way I could also make the examples
relevant, which is particularly important for bytea.
One thing I think worth mentioning: while documenting the trim()
function I realized that I never implemented the bytea equivalent of
rtrim and ltrim. Therefore, the 'leading' and 'trailing' forms of trim,
available with text, are not available with bytea (I'd be happy to
correct this, but since it would require an initdb, I guess not until
7.3) -- the submitted doc accurately reflects this.
I will look for other areas of the docs that need mention of bytea, but
any guidance would be much appreciated.
--
Here's a second bytea documentation patch. This one significantly
expands the "Binary Data" section added by Bruce recently.
Tom Lane [Mon, 19 Nov 2001 19:03:56 +0000 (19:03 +0000)]
Try to be a little bit clearer about the implications of GRANT TO PUBLIC
and REVOKE FROM PUBLIC: the latter is not the same as 'revoke from all
users', but the ref page blurred the difference.
Tom Lane [Sun, 18 Nov 2001 23:24:16 +0000 (23:24 +0000)]
Add example of using 'sameuser' followed by 'all' pg_hba records to
enforce a limit on who can connect to databases other than their own.
From a recent discussion in pg-admin.
Tom Lane [Sun, 18 Nov 2001 00:59:00 +0000 (00:59 +0000)]
Fix obsolete claim that only btree indexes support multiple columns;
GiST does now, too. (Someone needs to write a description of GiST
to add to this chapter. I don't know enough about it ...)
Tom Lane [Sun, 18 Nov 2001 00:38:00 +0000 (00:38 +0000)]
Clean up treatment of creating/dropping databases in User's Guide and
Admin Guide. Move discussion of template databases out of footnotes
in CREATE DATABASE ref page and into a section of the Admin Guide.
Clean up various obsolete claims, do some copy-editing.
Tom Lane [Sat, 17 Nov 2001 22:20:34 +0000 (22:20 +0000)]
Expand documentation for sequence functions (nextval and friends).
Place it in the expected place in the User's Guide, rather than
hiding it in the command reference page for CREATE SEQUENCE.
Tom Lane [Sat, 17 Nov 2001 06:09:30 +0000 (06:09 +0000)]
Fix performance problems in TOAST compressor. The management of
search lists was broken in such a way that only the most recent
instance of a given hash code would ever be searched, thus possibly
missing longer matches further back. Fixing this gave 5 to 10%
compression improvement on some text test cases. Additional small
tweaks to improve speed of inner loops a little bit. There is no
compatibility issue created by this change, since the compressed data
format and decompression algorithm don't change.
Tom Lane [Fri, 16 Nov 2001 23:30:35 +0000 (23:30 +0000)]
IsSystemRelationName() treats TOAST relations as system relations.
This seems the right thing for most usages, but I notice two places
where it is the wrong thing. One is that the default permissions on
TOAST rels should be no-access, not world-readable; the other is that
PrepareForTupleInvalidation doesn't really need to spend time looking
at tuples of TOAST relations.
Tom Lane [Fri, 16 Nov 2001 04:08:33 +0000 (04:08 +0000)]
Update keyword lists per suggestions by Peter. There are now four
mutually exclusive keyword lists spanning all known keywords ---
including AS. Moved COALESCE and a few other ColLabels into the
can-be-ColId list.
Tom Lane [Wed, 14 Nov 2001 22:14:22 +0000 (22:14 +0000)]
Try to be a little less terse about dealing with variable-length structs
in C, but recommend that newbies who don't recognize this trick should do
some studying ...
Barry Lind [Wed, 14 Nov 2001 04:11:37 +0000 (04:11 +0000)]
Attached is a patch against the CVS repository that fixes the ResultSet absolute() problem.
There's also a little fix for the getRow() method. While fixing
absolute(), I noticed that getRow() wasn't quite following the spec: it
wasn't returning 0 when the ResultSet wasn't positioned on a row. I've
started a ResultSet test case and included it as well.
Tom Lane [Mon, 12 Nov 2001 21:04:46 +0000 (21:04 +0000)]
Tweak parser so that there is a defined representation for datatypes
bpchar, bit, numeric with typmod -1. Alter format_type so that this
representation is printed when the typmod is -1. This ensures that
tables having such columns can be pg_dump'd and reloaded correctly.
Also, remove the rather useless and non-SQL-compliant default
precision and scale for type NUMERIC. A numeric column declared as
such (with no precision/scale) will now have typmod -1 which means
that numeric values of any precision/scale can be stored in it,
without conversion to a uniform scale. This seems significantly
more useful than the former behavior. Part of response to bug #513.
Tom Lane [Mon, 12 Nov 2001 20:05:24 +0000 (20:05 +0000)]
If the alternatives for a CASE construct all have the same typmod,
use that typmod not -1 as the typmod of the CASE result.
Part of response to bug#513.
Tom Lane [Mon, 12 Nov 2001 20:04:20 +0000 (20:04 +0000)]
If the inputs of a UNION/INTERSECT/EXCEPT construct all agree on the
typmod of a particular column, mark the output with that same typmod,
not -1 as formerly. -1 is still used if there is any disagreement.
Part of response to bug#513.