pg_dump && aggregate bug - Mailing list pgsql-bugs

From Mathieu Arnold
Subject pg_dump && aggregate bug
Date
Msg-id 2320161025.1021990435@andromede.reaumur.absolight.net
Whole thread Raw
Responses Re: pg_dump && aggregate bug
List pgsql-bugs
Hi

I have :

CREATE FUNCTION "first_cat" (text,text) RETURNS text AS 'SELECT CASE WHEN
$1 IS NULL THEN $2 ELSE $1 END' LANGUAGE 'sql';

and :

CREATE AGGREGATE first ( BASETYPE = text, SFUNC = first_cat, STYPE = text);

when I dump my database, in the dump file, the aggregate becomes :

CREATE AGGREGATE first ( BASETYPE = text, SFUNC = first_cat, STYPE = text,
INITCOND = '' );

which is *not* the same as you may imagine...

To dump my database, I use :
pg_dump -c

and I use :
PostgreSQL 7.2.1 on i386-portbld-freebsd4.5, compiled by GCC 2.95.3

I believe it lies around lines 3860 - 3864 of src/bin/pg_dump/pg_dump.c,
but I don't find what's wrong with it.

--
Mathieu Arnold

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #670: netmask displayed for a /32
Next
From: "Josh Berkus"
Date:
Subject: Re: [SQL] Bug with Daylight Savings Time & Interval