Search Postgresql Archives

Re: CREATE OR REPLACE AGGREGATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 15, 2011 at 11:29 AM, Robert James <srobertjames@xxxxxxxxx> wrote:
> Is there anyway to do the equivalent of CREATE OR REPLACE AGGREGATE?
> Or - maybe even better - CREATE AGGREGATE if it doesn't already exist?

Well, you have DROP [IF EXISTS] which should cover at least some of
the use cases.

I'm not sure a OR REPLACE for aggreates is a good idea -- you can
already REPLACE the internal function (which is mostly what you need).
 The aggregate itself mainly defines the input types, state, and
output types.  The main advantage of replace is you get to preserve
the oid and avoid dependency issues -- if you are changing the
aggregate, it's pretty likely you'd have to go through that anyways.

merlin

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux