Igor Stassiy writes:
> This question refers to version 9.4 of Postgres. I have have a function
> Datum do_something(PG_FUNCTION_ARGS)
> {
> ...
> if(error_occured) {
> ereport(ERROR, (errmsg("some error occured")));
> }
> ...
> }
> When I call do_something in a way to del
Hello all,
This question refers to version 9.4 of Postgres. I have have a function
Datum do_something(PG_FUNCTION_ARGS)
{
...
if(error_occured) {
ereport(ERROR, (errmsg("some error occured")));
}
...
}
When I call do_something in a way to deliberately cause the error
cond
On 2012-06-20, Little, Douglas wrote:
> --_000_8585BA53443004458E0BAA6134C5A7FBADD4CD8CEGEXCMB01owwroo_
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> Hello,
>
> Greenplum 4.1.2.4 (PG 8.2.3)
> We are revising how we implement functions in order to
Hello,
Greenplum 4.1.2.4 (PG 8.2.3)
We are revising how we implement functions in order to better capture and
handle fatal errors.
What we want to have happen,
1. is to have the fatal error captured,
2. logged to our processing table,
3. then have the function & psql exit wi
Thanks Pavel, this is exactly what I have been looking for.
Allan
On Thu, Dec 9, 2010 at 8:44 AM, Pavel Stehule wrote:
> Hello
>
> http://www.postgresql.org/docs/9.0/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
>
> Regards
>
> Pavel Stehule
>
> 2010/12/9 Allan Kamau :
>> I
Hello
http://www.postgresql.org/docs/9.0/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
Regards
Pavel Stehule
2010/12/9 Allan Kamau :
> I am searching for the resource that explains how to handle SQL
> related exceptions in PL/PgSQL without letting the function's
> execution
I am searching for the resource that explains how to handle SQL
related exceptions in PL/PgSQL without letting the function's
execution terminate.
I would like to use his to address possible UNIQUE constraint
violation (and resulting exception) attributed to multiple clients
concurrently populating
On Thu, 2006-10-12 at 16:12 -0400, Germán Hüttemann Arza wrote:
> I am writing triggers procedures in PL/pgSQL and I need to handle some
> errors inside the procedures.
> Specifically, I am doing a CAST(char AS integer) and I want to know
> when the char isn't a digit. How can I get do that?
>
>
On Thu, 2006-10-12 at 15:22 -0500, Tony Caduto wrote:
> Germán Hüttemann Arza wrote:
> > I am writing triggers procedures in PL/pgSQL and I need to handle some
> > errors inside the procedures.
> > Specifically, I am doing a CAST(char AS integer) and I want to know
> > when the char isn't a digit
Germán Hüttemann Arza wrote:
I am writing triggers procedures in PL/pgSQL and I need to handle some
errors inside the procedures.
Specifically, I am doing a CAST(char AS integer) and I want to know
when the char isn't a digit. How can I get do that?
Just off the top of my head I would say you
I am writing triggers procedures in PL/pgSQL and I need to handle some errors inside the procedures. Specifically, I am doing a CAST(char AS integer) and I want to know when the char isn't a digit. How can I get do that?
Regards,-- Germán Hüttemann
Tom Lane wrote:
Don Y <[EMAIL PROTECTED]> writes:
I'm writing a set of casts to/from various user defined
types. As is unexpected, there are cases where one
data type doesn't neatly map to another (for certain
values). In these cases I emit an INVALID_PARAMETER_VALUE
or OUT_OF_RANGE error -- d
Don Y <[EMAIL PROTECTED]> writes:
> I'm writing a set of casts to/from various user defined
> types. As is unexpected, there are cases where one
> data type doesn't neatly map to another (for certain
> values). In these cases I emit an INVALID_PARAMETER_VALUE
> or OUT_OF_RANGE error -- depending
Hi,
I'm writing a set of casts to/from various user defined
types. As is unexpected, there are cases where one
data type doesn't neatly map to another (for certain
values). In these cases I emit an INVALID_PARAMETER_VALUE
or OUT_OF_RANGE error -- depending on the situation.
But, should I also
PostGresQL 8 beta1.
PGAdmin III beta 1.21
Is there a way to see what error code or error message occured when an error
happens?
I am trying to perform exception handling and a create view that included
another view that did not exist occured in a plpgsql function.
I finally figured out that the er
> You mean that the default generated error messages contain some more
> information I presume, like the table name and the constraint name ?
Even better, the information is *structured* afaik.
> I think I noticed that already, and since I had time since yesterday
> evening, I thought things over
On Sun, 30 May 2004 22:08:10 +0200
Karsten Hilbert <[EMAIL PROTECTED]> wrote:
> > This then, removes the first part of my explanation, and dumps me
> > completely in the second part, which is where the biggest problems
> > reside.
> AFAICT 7.4 does much better error handling (no, you can't
> easil
> This then, removes the first part of my explanation, and dumps me
> completely in the second part, which is where the biggest problems
> reside.
AFAICT 7.4 does much better error handling (no, you can't
easily control error handling inside a transaction, though). It
reports errors in a way that c
On Sun, 30 May 2004 20:04:50 +0200
Karsten Hilbert <[EMAIL PROTECTED]> wrote:
> > a) The basic contents of the internal data dictionary can be used to
> > check incoming fields from on their length and permitted contents.
> >
> > b) With a little extra work, I should be able to define a table
> >
> a) The basic contents of the internal data dictionary can be used to
> check incoming fields from on their length and permitted contents.
>
> b) With a little extra work, I should be able to define a table which
> can be used to check field contents against field masks.
You can use column check
I am currently designing an application which should be accessible from
different interfaces. For this I like to be using stored procedures to
process the contents of form submissions and dialog screens.
After studying the PG database, it seems to me that I can fulfill the
following requirements.
From: "Janning Vygen" <[EMAIL PROTECTED]>
> one of my problems:
> if i have a value like bool or int2 and the frontend is html and just
takes
> the input from a textfield, the backend returns an error before executing
the
> trigger beacuse the values cant be parsed into the correct type.
>
> But
Hi,
i try do achieve that my database checks every entry on insert and update and
returns german error messages, so my frontend knows what's wrong and can show
some reasonable error messages to the user.
i wrote a trigger who checks BEFORE every insert and updtae and returns error
messages if
23 matches
Mail list logo