bug in dependency - there is possibility to break a system catalog

Started by Pavel Stehuleover 14 years ago2 messagesbugs
Jump to latest
#1Pavel Stehule
pavel.stehule@gmail.com

Hello

our customer reported a broken system dictionary. The following
statements breaks a catalog:

postgres=# CREATE TYPE test_type AS (a integer, b integer);
CREATE TYPE
Time: 61,016 ms
postgres=#
postgres=# CREATE FUNCTION test_func (variadic x text[] =
'{NULL}'::"test_type"[])
postgres-# RETURNS pg_catalog.void AS $body$ BEGIN END; $body$
LANGUAGE 'plpgsql';
CREATE FUNCTION
Time: 24,637 ms
postgres=#
postgres=# DROP TYPE test_type;
DROP TYPE
Time: 6,824 ms

postgres=# \df
ERROR: cache lookup failed for type 16579
postgres=# select version();
version
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
PostgreSQL 9.2devel on x86_64-unknown-linux-gnu, compiled by gcc
(GCC) 4.6.0 20110603 (Red Hat 4.6.0-10), 64-bit
(1 row)

Time: 2,021 ms
postgres=#

Regards

Pavel Stehule

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Pavel Stehule (#1)
Re: bug in dependency - there is possibility to break a system catalog

Pavel Stehule <pavel.stehule@gmail.com> writes:

[ we forgot to record dependencies on function default expressions ]

Fixed, thanks for the report.

regards, tom lane