Skip site navigation (1) Skip section navigation (2)

Re: Implementation of SQLCODE and SQLERRM variables for

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ali Baba <idofyear(at)yahoo(dot)com>, <pgsql-hackers(at)postgresql(dot)org>,<pgsql-patches(at)postgresql(dot)org>
Subject: Re: Implementation of SQLCODE and SQLERRM variables for
Date: 2005-03-06 20:51:49
Message-ID: Pine.LNX.4.44.0503062133440.32436-100000@kix.fsv.cvut.cz (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
> 
> I think we discussed this last year and decided that it would be a bad
> idea to use those names because Oracle's use of them is not exactly
> compatible with our error codes and messages.  SQLCODE in particular is
> not compatible at all --- it's an integer in Oracle, isn't it?

There is more incompatibilities to Oracle. SQLERRM is function on Oracle, 
only if you use it without parametr, returns current message error. 
SQLCODE is really integer. But it's only names. There is no problem change 
it.

> 
> IIRC we had put off solving this problem until we decided what to do
> with RAISE.  There really needs to be some changes in RAISE to allow it
> to raise a specific error code rather than always P0001, but exactly
> what is still undecided.

I didn't know it. But for my work is SQLERRM more important. I have more 
constraints on tables and I need detect which which constraints raise 
exception. The possibility EXCEPTION WITH OTHERS is nice, but not too much 
usefull because I have not possibility get some informations about except. 

> 
> Some other problems with your patch: no documentation, and not in
> diff -c format.  Plain diff patches are never acceptable because
> it's too risky to apply them against files that might have changed
> since you started working with them.  Also, it's much easier to
> deal with one patch than with a separate diff for each file.
> (diff -c -r between an original and a modified directory is one
> good way to produce a useful patch.)
> 

I am not sure, I able create documentation - my english is poor. I will 
change diff's format and send patch again.

Thank you
Pavel


In response to

Responses

pgsql-hackers by date

Next:From: Ioannis TheoharisDate: 2005-03-06 21:33:24
Subject: About b-tree usage
Previous:From: Tom LaneDate: 2005-03-06 20:05:05
Subject: Re: Implementation of SQLCODE and SQLERRM variables for PL/pgSQL

pgsql-patches by date

Next:From: Mark KirkwoodDate: 2005-03-06 22:47:44
Subject: Re: Display Pg buffer cache (WIP)
Previous:From: Tom LaneDate: 2005-03-06 20:05:05
Subject: Re: Implementation of SQLCODE and SQLERRM variables for PL/pgSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group