Re: [HACKERS] ambiguous sql states

2003-08-24 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > I had a private chat with Dave about this. It was my view that a missing > file that is read by a backend COPY is indistinguishable from, say, a > missing table or trigger, as far as recovery options by the client > application are concerned. Hm. On

Re: [HACKERS] ambiguous sql states

2003-08-24 Thread Dave Cramer
Tom, The reason it is of importance to me/ecpg is for informix compatibility. informix returns a unique errorcode for the copy operation when the file is not found. this isn't much of an argument from a postgres POV, however I still find the sqlstate to be ambiguous. Dave On Sun, 2003-08-24 a

Re: [HACKERS] ambiguous sql states

2003-08-24 Thread Peter Eisentraut
Tom Lane writes: > Dave's correct, that's what we're currently using. I'm happy to change > it if someone can suggest an appropriate SQLSTATE (even a category...) > to use instead. I had a private chat with Dave about this. It was my view that a missing file that is read by a backend COPY is in

Re: [HACKERS] ambiguous sql states

2003-08-24 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Dave Cramer writes: >> I'm working on identifying various errors in ecpg using sql state and >> one which is particularly ambiguous is ERRCODE_UNDEFINED_OBJECT for a >> file which isn't found. This is returned in a number of places. Is it >> possible t

Re: [HACKERS] ambiguous sql states

2003-08-23 Thread Dave Cramer
Specifically, if you try to open a file for copy, and it isn't there it will return int errcode_for_file_access(void) { case ENOENT:/* No such file or directory */ edata->sqlerrcode = ERRCODE_UNDEFINED_OBJECT; bre

Re: [HACKERS] ambiguous sql states

2003-08-23 Thread Peter Eisentraut
Dave Cramer writes: > I'm working on identifying various errors in ecpg using sql state and > one which is particularly ambiguous is ERRCODE_UNDEFINED_OBJECT for a > file which isn't found. This is returned in a number of places. Is it > possible to get a set of file specific error codes? That er

[HACKERS] ambiguous sql states

2003-08-23 Thread Dave Cramer
I'm working on identifying various errors in ecpg using sql state and one which is particularly ambiguous is ERRCODE_UNDEFINED_OBJECT for a file which isn't found. This is returned in a number of places. Is it possible to get a set of file specific error codes? Dave -- Dave Cramer <[EMAIL PROTEC