BUG #1713: dbmirror replaces nextval, setval functions

From: "James Doherty" <jdoherty(at)yak(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1713: dbmirror replaces nextval, setval functions
Date: 2005-06-10 15:29:58
Message-ID: 20050610152958.A018CF0B0A@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1713
Logged by: James Doherty
Email address: jdoherty(at)yak(dot)com
PostgreSQL version: 8.0.3
Operating system: Solaris 8 Intel
Description: dbmirror replaces nextval, setval functions
Details:

The dbmirror contrib program replaces some key functions when setting up the
Mirroring table (MirrorSetup.sql). The nextval and setval functions are
renamed as nextval_pg and setval_pg and replaced with new functions.

This breaks any fields made with the SERIAL datatype, which have to be
ALTER'ed to use the nextval_pg and setval_pg functions to work properly.

Here's the offending code in MirrorSetup.sql:
UPDATE pg_proc SET proname='nextval_pg' WHERE proname='nextval';

CREATE FUNCTION pg_catalog.nextval(text) RETURNS int8 AS
'$libdir/pending.so', 'nextval' LANGUAGE 'C' STRICT;

UPDATE pg_proc set proname='setval_pg' WHERE proname='setval';

CREATE FUNCTION pg_catalog.setval("unknown",integer,boolean) RETURNS int8
AS
'$libdir/pending.so', 'setval' LANGUAGE 'C' STRICT;
CREATE FUNCTION pg_catalog.setval("unknown",integer) RETURNS int8 AS
'$libdir/pending.so', 'setval' LANGUAGE 'C' STRICT;

Browse pgsql-bugs by date

  From Date Subject
Next Message James Doherty 2005-06-10 15:31:43 BUG #1714: dbmirror replaces nextval, setval functions
Previous Message Gilles Dubochet 2005-06-10 13:28:29 BUG #1712: JDBC column precision for bigint is 0