Re: Getting "cache lookup failed for aggregate" error

From: Igor Neyman <ineyman(at)perceptron(dot)com>
To: Patrick Krecker <patrick(at)judicata(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Getting "cache lookup failed for aggregate" error
Date: 2014-06-25 13:46:10
Message-ID: A76B25F2823E954C9E45E32FA49D70EC919979F9@mail.corp.perceptron.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

FWIW the SQL is

DROP AGGREGATE IF EXISTS array_cat_aggregate(anyarray);
CREATE AGGREGATE array_cat_aggregate(anyarray) (
SFUNC = array_cat,
STYPE = anyarray,
INITCOND = '{}'
);

Followed by the other statement given in my previous email. But, I think you've thoroughly answered by question. Thanks!

So, instead of dropping aggregate “if exists” why not check pg_catalog for aggregate existence, and create it only if it does NOT exist?

Regards,
Igor Neyman

In response to

Browse pgsql-general by date

  From Date Subject
Next Message James Le Cuirot 2014-06-25 14:16:19 Re: Alternative to psql -c ?
Previous Message James Le Cuirot 2014-06-25 13:43:25 Alternative to psql -c ?