Re: Can SELECT statements throw an error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik Wasser <erik(dot)wasser(at)iquer(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Can SELECT statements throw an error
Date: 2005-07-21 14:35:26
Message-ID: 19902.1121956526@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Erik Wasser <erik(dot)wasser(at)iquer(dot)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. Consider
select 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2005-07-21 15:18:11 Re: Are long term never commited SELECT statements are a problem?
Previous Message Achilleus Mantzios 2005-07-21 14:21:05 Re: Are long term never commited SELECT statements are a