Re: pg_dump && aggregate bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mathieu Arnold <mat(at)mat(dot)cc>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_dump && aggregate bug
Date: 2002-05-21 14:19:35
Message-ID: 20451.1021990775@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Mathieu Arnold <mat(at)mat(dot)cc> writes:
> when I dump my database, in the dump file, the aggregate becomes :

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

Ooops. This seems to be fixed already in current sources, but I think
a back-patch to 7.2 may be warranted. Try this around line 1912:

agginfo[i].aggbasetype = strdup(PQgetvalue(res, i, i_aggbasetype));
- agginfo[i].agginitval = strdup(PQgetvalue(res, i, i_agginitval));
+ if (PQgetisnull(res, i, i_agginitval))
+ agginfo[i].agginitval = NULL;
+ else
+ agginfo[i].agginitval = strdup(PQgetvalue(res, i, i_agginitval));
agginfo[i].usename = strdup(PQgetvalue(res, i, i_usename));

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-05-21 14:31:57 Re: Bug #669: gawk: cmd. line:2: (END OF FILE)
Previous Message Tom Lane 2002-05-21 14:12:20 Re: Bug #670: netmask displayed for a /32