21761 Commits

Author SHA1 Message Date
Tom Lane
0138fb8697 Repair oidvectorrecv and int2vectorrecv, which I broke while changing
them to use array_recv :-(.  Per report from Tim Kordas.
2006-03-02 21:13:11 +00:00
Bruce Momjian
5e4bf929b3 Update OS X shared memory documentation for 10.3.9 and later to use
/etc/sysctl.conf.

Chris Campbell
2006-03-02 20:30:33 +00:00
Bruce Momjian
3fb582c3bc Backpatch to 8.1.X. Already applied to CVS HEAD.
---------------------------------------------------------------------------

> True, but they're not being used where you'd expect. This seems to be
> something to do with the fact that it's not pg_authid which is being
> accessed, but rather the view pg_roles.

I looked into this and it seems the problem is that the view doesn't
get flattened into the main query because of the has_nullable_targetlist
limitation in prepjointree.c.  That's triggered because pg_roles has
        '********'::text AS rolpassword
which isn't nullable, meaning it would produce wrong behavior if
referenced above the outer join.

Ultimately, the reason this is a problem is that the planner deals only
in simple Vars while processing joins; it doesn't want to think about
expressions.  I'm starting to think that it may be time to fix this,
because I've run into several related restrictions lately, but it seems
like a nontrivial project.

In the meantime, reducing the LEFT JOIN to pg_roles to a JOIN as per
Peter's suggestion seems like the best short-term workaround.
2006-03-02 19:40:29 +00:00
Bruce Momjian
006bd450fe Mark tsearch2 item as Tom's, not Teodor's. 2006-03-02 19:35:14 +00:00
Tom Lane
b3c47b1e5e Fix possible crash at transaction end when a plpgsql function is used and
then modified within the same transaction.  The code was using a linked list
of active PLpgSQL_expr structs, which was OK when it was written because
plpgsql never released any parse data structures for the life of the backend.
But since Neil fixed plpgsql's memory management, elements of the linked list
could be freed, leading to crash when the list is chased.  Per report and test
case from Kris Jurka.
2006-03-02 05:34:17 +00:00
Bruce Momjian
15516c5f0b Update FAQ_DEV text file. 2006-03-01 22:25:36 +00:00
Bruce Momjian
88a4314bb1 Update patch generation instructions.
Robert Treat
2006-03-01 22:23:49 +00:00
Bruce Momjian
e559dba846 Update Japanese FAQ, backpatched to 8.1.X. 2006-03-01 20:31:56 +00:00
Bruce Momjian
6853e34132 Add pg_service.conf documentation for libpq. 2006-03-01 00:23:33 +00:00
Bruce Momjian
3952eecd4a Fix computation of sample table size. 2006-02-25 04:30:06 +00:00
Bruce Momjian
032858216c Backpatch FAQ changes to 8.1.X. 2006-02-24 15:00:48 +00:00
Bruce Momjian
39825338b4 Mention that the archive history file has the wal start/stop file names. 2006-02-24 14:03:11 +00:00
Andrew Dunstan
400606f3a8 make initdb -U username work as advertised; back out bogus patch at rev 1.42
and supply real fix for problem it tried to address.
2006-02-24 00:55:27 +00:00
Tom Lane
05d2a7256e Fix vacuumlo to avoid unnecessary use of backslash in search pattern.
Per Michael Fuhr.
2006-02-23 22:34:07 +00:00
Tom Lane
6f96c539ed Fix old pg_dump oversight: default values for domains really need to be dumped
by decompiling the typdefaultbin expression, not just printing the typdefault
text which may be out-of-date or assume the wrong schema search path.  (It's
the same hazard as for adbin vs adsrc in column defaults.)  The catalogs.sgml
spec for pg_type implies that the correct procedure is to look to
typdefaultbin first and consider typdefault only if typdefaultbin is NULL.
I made dumping of both domains and base types do that, even though in the
current backend code typdefaultbin is always correct for domains and
typdefault for base types --- might as well try to future-proof it a little.
Per bug report from Alexander Galler.
2006-02-21 18:01:41 +00:00
Tom Lane
a386cd7806 Adjust probe for getaddrinfo to cope with macro-ized definitions, such
as Tru64's.  Per previous discussion.
2006-02-21 06:07:10 +00:00
Neil Conway
797deb5092 Fix three Python reference leaks in PLy_traceback(). This would result
in leaking memory when invoking a PL/Python procedure that raises an
exception. Unfortunately this still leaks memory, but at least the
largest leak has been plugged.

This patch also fixes a reference counting mistake in PLy_modify_tuple()
for 8.0, 8.1 and HEAD: we don't actually own a reference to `platt', so
we shouldn't Py_DECREF() it.
2006-02-20 20:10:41 +00:00
Neil Conway
3bd549ba0a Patch from Marko Kreen:
pgcrypto crypt()/md5 and hmac() leak memory when compiled against
OpenSSL as openssl.c digest ->reset will do two DigestInit calls
against a context.  This happened to work with OpenSSL 0.9.6
but not with 0.9.7+.

Reason for the messy code was that I tried to avoid creating
wrapper structure to transport algorithm info and tried to use
OpenSSL context for it.  The fix is to create wrapper structure.

It also uses newer digest API to avoid memory allocations
on reset with newer OpenSSLs.

Thanks to Daniel Blaisdell for reporting it.
2006-02-18 20:48:53 +00:00
Tom Lane
4fc6585cb9 Move btbulkdelete's vacuum_delay_point() call to a place in the loop where
we are not holding a buffer content lock; where it was, InterruptHoldoffCount
is positive and so we'd not respond to cancel signals as intended.  Also
add missing vacuum_delay_point() call in btvacuumcleanup.  This should fix
complaint from Evgeny Gridasov about failure to respond to SIGINT/SIGTERM
in a timely fashion (bug #2257).
2006-02-14 17:20:10 +00:00
Tom Lane
efaac136bf Add some missing vacuum_delay_point calls in GIST vacuuming. 2006-02-14 16:39:36 +00:00
Tom Lane
d8882a2c66 Fix qual_is_pushdown_safe to not try to push down quals involving a whole-row
Var referencing the subselect output.  While this case could possibly be made
to work, it seems not worth expending effort on.  Per report from Magnus
Naeslund(f).
2006-02-13 16:22:29 +00:00
Tom Lane
d72c32a0d1 Stamp 8.1.3. REL8_1_3 2006-02-12 22:37:44 +00:00
Tom Lane
ef434ebfbc Update release notes. 2006-02-12 22:35:36 +00:00
Tom Lane
20334a9e86 Fix bug that allowed any logged-in user to SET ROLE to any other database user
id (CVE-2006-0553).  Also fix related bug in SET SESSION AUTHORIZATION that
allows unprivileged users to crash the server, if it has been compiled with
Asserts enabled.  The escalation-of-privilege risk exists only in 8.1.0-8.1.2.
However, the Assert-crash risk exists in all releases back to 7.3.
Thanks to Akio Ishida for reporting this problem.
2006-02-12 22:32:57 +00:00
Tom Lane
b71e2bb122 Fix broken markup. 2006-02-12 21:13:00 +00:00
Bruce Momjian
68f34bf281 Update README file.
Joshua D. Drake
2006-02-12 19:24:35 +00:00
Bruce Momjian
544ccf6ce6 Update wording for 8.1.X, remove <only>:
This option can <only> be set at server start or in the
        <filename>postgresql.conf</filename> configuration file.
2006-02-12 19:19:37 +00:00
Bruce Momjian
a22873a19e > Actually, if you submit a patch that says either "SCROLL is the
default"
> or "NO SCROLL is the default", it will be rejected as incorrect.  The
> reason is that the default behavior is different from either of these,
> as is explained in the NOTES section.

Ok, so *that's* where the bit about the query plan being simple enough.
Based on that, ISTM that it should be premissable for us to decide that
a cursor requiring a sort isn't "simple enough" to support SCROLL.

In any case, here's a patch that makes the non-standard behavior easier
for people to find.

Jim C. Nasby
2006-02-12 19:02:28 +00:00
Bruce Momjian
34d9bbee4d Stamp releases for 2006-02-14 release 2006-02-12 18:42:20 +00:00
Bruce Momjian
003daafb0d Fix release item ordering. 2006-02-12 18:14:29 +00:00
Bruce Momjian
12ea69aaf5 Update back branch release notes. 2006-02-12 17:58:31 +00:00
Bruce Momjian
d9dafcc5d6 Fix release markup. 2006-02-12 17:28:23 +00:00
Bruce Momjian
a318438fb3 Stamp 8.1.3, but exclude configure.in/configure change. 2006-02-12 17:17:39 +00:00
Bruce Momjian
3a9c81e3e9 Update release notes for 8.1.3. 2006-02-12 17:11:28 +00:00
Tom Lane
b919f3fcbb Check that SID is enabled while checking for Windows admin privileges.
Magnus
2006-02-10 21:52:34 +00:00
Tom Lane
2d26c4be8e Change search for default operator classes so that it examines all opclasses
regardless of the current schema search path.  Since CREATE OPERATOR CLASS
only allows one default opclass per datatype regardless of schemas, this
should have minimal impact, and it fixes problems with failure to find a
desired opclass while restoring dump files.  Per discussion at
http://archives.postgresql.org/pgsql-hackers/2006-02/msg00284.php.
Remove now-redundant-or-unused code in typcache.c and namespace.c,
and backpatch as far as 8.0.
2006-02-10 19:01:22 +00:00
Tom Lane
f9e03aa8e9 Provide the libpq error message when PQputline or PQendcopy fails. 2006-02-09 18:28:35 +00:00
Tom Lane
f527f082c5 Reject out-of-range dates in date_in().
Kris Jurka
2006-02-09 03:40:30 +00:00
Bruce Momjian
cfcf54ac89 Fix HTML alignment in PQprint.
Christoph Zwerschke
2006-02-07 00:26:38 +00:00
Bruce Momjian
763b9c1901 Fix PQprint HTML tag, "centre" -> "center". 2006-02-06 02:23:17 +00:00
Tom Lane
7d41ef1a92 Fix pg_restore to properly discard COPY data when trying to continue
after an error in a COPY statement.  Formerly it thought the COPY data
was SQL commands, and got quite confused.

Stephen Frost
2006-02-05 20:58:57 +00:00
Bruce Momjian
c75c372c58 Fix typo in configuration docs.
Devrim GUNDUZ
2006-02-05 18:19:33 +00:00
Bruce Momjian
3bf6284f10 Update PL/pgSQL trigger example to be clearer about how to "merge" data
into a table.

Jim C. Nasby
2006-02-05 02:48:20 +00:00
Bruce Momjian
180b23cb22 Fix const cast in get_progname().
Backpatch.
2006-02-01 12:42:00 +00:00
Bruce Momjian
bc1c9adbda Set progname early in the postmaster/postgres binary, rather than doing
it later.  This fixes a problem where EXEC_BACKEND didn't have progname
set, causing a segfault if log_min_messages was set below debug2 and our
own snprintf.c was being used.

Also alway strdup() progname.

Backpatch to 8.1.X and 8.0.X.
2006-02-01 00:32:06 +00:00
Tom Lane
2aa231be9e Allow %TYPE to be used with SETOF, per gripe from Murat Tasan. 2006-01-31 22:40:12 +00:00
Tom Lane
ecde4216c9 Fix ALTER COLUMN TYPE bug: it sometimes tried to drop UNIQUE or PRIMARY KEY
constraints before FOREIGN KEY constraints that depended on them.  Originally
reported by Neil Conway on 29-Jun-2005.  Patch by Nakano Yoshihisa.
2006-01-30 16:19:04 +00:00
Tom Lane
0ab9d3a3e1 When building a bitmap scan, must copy the bitmapqualorig expression tree
to avoid sharing substructure with the lower-level indexquals.  This is
currently only an issue if there are SubPlans in the indexquals, which is
uncommon but not impossible --- see bug #2218 reported by Nicholas Vinen.
We use the same kluge for indexqual vs indexqualorig in the index scans
themselves ... would be nice to clean this up someday.
2006-01-29 18:55:55 +00:00
Tom Lane
2d98f46255 Fix code that checks to see if an index can be considered to match the query's
requested sort order.  It was assuming that build_index_pathkeys always
generates a pathkey per index column, which was not true if implied equality
deduction had determined that two index columns were effectively equated to
each other.  Simplest fix seems to be to install an option that causes
build_index_pathkeys to support this behavior as well as the original one.
Per report from Brian Hirt.
2006-01-29 17:27:50 +00:00
Andrew Dunstan
18d6948858 Undo perl's nasty locale setting on Windows. Since we can't do that as
elsewhere by setting the environment appropriately, we make perl do it
right after interpreter startup by calling its POSIX::setlocale().
2006-01-28 16:21:33 +00:00