Re: user aggregate with exception handling - Mailing list pgsql-novice

From David G Johnston
Subject Re: user aggregate with exception handling
Date
Msg-id 1405088833441-5811289.post@n5.nabble.com
Whole thread Raw
In response to user aggregate with exception handling  ("j. z." <zbudniewkowo@interia.pl>)
List pgsql-novice
j. z. wrote
> Hi. I need to apply a postgis aggregate function. Since usual usage throws
> errors, in case of error I need to use the aggregate function with another
> argument to avoid an error
>
> How can I achieve the goal?

You need to create a custom aggregate function.

http://www.postgresql.org/docs/9.2/interactive/sql-createaggregate.html

Which involves creating two normal functions ( though you can possibly
leverage an existing final func ).

David J.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/user-aggregate-with-exception-handling-tp5811279p5811289.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


pgsql-novice by date:

Previous
From: "j. z."
Date:
Subject: user aggregate with exception handling
Next
From: spake@surewest.net
Date:
Subject: PGSQL 9.3.2 COPY command issues