Re: user aggregate with exception handling

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: user aggregate with exception handling
Date: 2014-07-11 14:27:13
Message-ID: 1405088833441-5811289.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message spake 2014-07-17 19:01:26 PGSQL 9.3.2 COPY command issues
Previous Message j. z. 2014-07-11 13:38:39 user aggregate with exception handling