Re: [HACKERS] pg_dump bug - problems along the way

From: Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it>
To: hackers(at)postgresql(dot)org, "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
Subject: Re: [HACKERS] pg_dump bug - problems along the way
Date: 1998-11-23 14:35:34
Message-ID: 18649.981123@bo.nettuno.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Oliver,

sabato, 21 novembre 98, you wrote:

OE> Still trying to fix the bug with inherited check constraints...

OE> I have tried to create a min(oid) aggregate, but when I use it, I get
OE> the message `ERROR: fmgr_info: function 108994: cache lookup failed'.

OE> What is the problem, please?

OE> I created it thus:

OE> create function oid4smaller (oid, oid) returns oid as
OE> '/home/olly/cprogs/oidcompare.so' language 'c';

OE> create aggregate min (basetype = oid, sfunc1 = oid4smaller,
OE> stype1 = oid, stype2 = oid);

Try this...it works...

create function oid4smaller (oid, oid) returns oid as
'
begin
if $1 > $2 then
return $2;
else
return $1;
end if;
end;
' language 'plpgsql';

create aggregate m (basetype = oid, sfunc1 = oid4smaller,
stype1 = oid, stype2 = oid);

prova=> select oid from a;
oid
------
376064
376065
380064
380065
380066
380067
(6 rows)

prova=> select min(oid) from a;
min
------
376064
(1 row)

-Jose'-

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1998-11-23 14:44:41 Re: [HACKERS] CVS problem ... fixed...
Previous Message Mark Hollomon 1998-11-23 14:34:28 Re: [HACKERS] Tree type, how best to impliment?