Thread: Can SELECT statements throw an error

Can SELECT statements throw an error

From
Erik Wasser
Date:
Hello list,

can SELECT statements throw errors except the followings:

- SQL syntax errors
- connection based errors (database is down/etc...)
- deadlocks

Did I miss an option?

-- 
So long... Fuzz


Re: Can SELECT statements throw an error

From
Tom Lane
Date:
Erik Wasser <erik.wasser@iquer.net> writes:
> can SELECT statements throw errors except the followings:

> - SQL syntax errors
> - connection based errors (database is down/etc...)
> - deadlocks

> Did I miss an option?

Many.  Considerselect 1 / 0
In general I'd think that most errors in the "data exception",
"cardinality violation", "insufficient resources",
and "operator intervention" categories are possible.  See the
error codes appendix for some ideas.

And of course, if the SELECT invokes a user-defined function,
no holds are barred ...
        regards, tom lane