Title: RE: [HACKERS] Anybody have an Oracle PL/SQL reference at hand?
> Tom Lane wrote:
>
> Hmm. Not only is that a pretty short list, but many of them don't
> correspond very closely to the errors that Postgres would raise.
I think these where like predefined 'shor
On Wed, Aug 04, 2004 at 09:46:22AM +0800, Christopher Kings-Lynne wrote:
> >Depending on how tense you want to be about Oracle compatibility, we
> >could make people actually write their blocks as above --- that is,
> >the SAVEPOINT and ROLLBACK commands would be a required part of the
> >exception
On Tue, 3 Aug 2004, Tom Lane wrote:
> "Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> > On Tue, Aug 03, 2004 at 10:17:14AM -0400, Tom Lane wrote:
> >> Right. Essentially, our implementation is supplying the SAVEPOINT and
> >> ROLLBACK TO commands implicitly as part of any block with an EXCEPTION
> >
BEGIN;
SAVEPOINT start;
INSERT INTO users VALUES(user || suffix);
EXIT;
EXCEPTION
WHEN UNIQUE_VIOLATION THEN
ROLLBACK TO start;
Depending on how tense you want to be about Oracle compatibility, we
could make people actually write their blocks as above --- that is,
the SAVEPOINT and ROLLBACK commands would be a required part of the
exception-block syntax. They wouldn't actually *do* anything, but
they would make the code lo
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> On Tue, Aug 03, 2004 at 10:17:14AM -0400, Tom Lane wrote:
>> Right. Essentially, our implementation is supplying the SAVEPOINT and
>> ROLLBACK TO commands implicitly as part of any block with an EXCEPTION
>> clause. When we get around to updating the "
On Tue, Aug 03, 2004 at 10:17:14AM -0400, Tom Lane wrote:
> Gavin Sherry <[EMAIL PROTECTED]> writes:
>
> > BEGIN;
> > SAVEPOINT start;
> > INSERT INTO users VALUES(user || suffix);
> > EXIT;
> > EXCEPTION
> >
The upsides, as I see them:
They use one system for handling all exceptions, user generated or not.
They didn't come up with their own arbitrary names for all the error
codes they have. Naming an exception follows all the namespace rules;
for example, the exception code example I gave was in the
Gavin Sherry <[EMAIL PROTECTED]> writes:
> BEGIN;
> SAVEPOINT start;
> INSERT INTO users VALUES(user || suffix);
> EXIT;
> EXCEPTION
> WHEN UNIQUE_VIOLATION THEN
>
Gavin Sherry <[EMAIL PROTECTED]> writes:
> I agree with you that forcing users to declare names for SQLCODEs is not
> such a great idea. What I do like, however, is the ability to declare your
> own exceptions. For example:
Agreed, that would be a good thing to have, but I think it's something
we'
One other difference when compared with Oracle is that Oracle does not
abort the transaction which raised the exception. Although I generally do
not think this is a great idea, it does allow for things like retry loops.
Assuming we have savepoints, consider the following function which creates
a us
On Mon, 2 Aug 2004, Tom Lane wrote:
> "Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> > Oracle defines very few named exceptions. Instead, the intention is that
> > you define a name for a numeric exception and use it yourself.
>
> Yeah, I noticed that. It seems a spectacularly bad idea :-(. What
>
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> Oracle defines very few named exceptions. Instead, the intention is that
> you define a name for a numeric exception and use it yourself.
Yeah, I noticed that. It seems a spectacularly bad idea :-(. What
redeeming social value has it got? AFAICS ther
On Sat, Jul 31, 2004 at 01:43:25PM -0400, Tom Lane wrote:
> Andrew Dunstan <[EMAIL PROTECTED]> writes:
> > Tom Lane wrote:
> >> Can anyone check how well the syntax of plpgsql EXCEPTION, as described
> >> at
> >> http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-
Hi Tom,
I have sent you and the list the HTML page from the oracle tech network
describing all of this. However, it seems to have disappeared in to the
void since you don't seem to have received it and it hasn't hit the list
yet.
You can get a free login to access all the oracle docs and manua
Andrew Dunstan <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Can anyone check how well the syntax of plpgsql EXCEPTION, as described
>> at
>> http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
>> agrees with what Oracle does?
> It appears you ca
Hello,
From I can tell from Oracle pl/SQL programming page 130 ;) it is
identical. However Oracle does have thinkgs like EXCEPTION_INIT.
Here are the name of the Oracle predefined exceptions:
CURSOR_ALREADY_OPEN
DUP_VAL_ON_INDEX
INVALID_CURSOR
INVALID_NUMBER
LOGIN_DENIED
NO_DATA_FOUND
NOT_LOGGED_
Tom Lane wrote:
Can anyone check how well the syntax of plpgsql EXCEPTION, as described
at
http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
agrees with what Oracle does? I did some googling but couldn't find
anything that seemed authoritative.
Can anyone check how well the syntax of plpgsql EXCEPTION, as described
at
http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
agrees with what Oracle does? I did some googling but couldn't find
anything that seemed authoritative. I'm wondering in
19 matches
Mail list logo