The following bug has been logged online: Bug reference: 3295 Logged by: Philip Ives Email address: [EMAIL PROTECTED] PostgreSQL version: 8.1.4 Operating system: Darwin and FreeBSD 4 Description: pg_get_serial_sequence returns wrong sequence name for a serial column Details:
pg_get_serial_sequence doesn't return the correct sequence name and returns a null. This function either shouldn't exist or it should always return the right name. : Table "public.ccprocesses" Column | Type | Modifiers ---------------------+-----------------------------+------------------------ ------------------------------------------ id | bigint | not null default nextval(('seq_ccprocesses_id'::text)::regclass) select * from pg_get_serial_sequence('ccprocesses','id'); pg_get_serial_sequence ------------------------ (1 row) ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend