Domanda

In Postgresql è possibile creare funzioni aggregate aggiuntive con

CREATE AGGREGATE name(...);

Ma questo dà un errore se l'aggregato esiste già all'interno del database, quindi come posso verificare se un aggregato esiste già nel database Postgres?

Altri suggerimenti

drop aggregate if exists my_agg(varchar);

create aggregate my_agg(varchar) (...);

select * from pg_aggregate
where aggfnoid = 'my_agg'::regproc;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top