Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-02-03 Thread Robert Haas
On Sun, Jan 30, 2011 at 6:27 PM, Tom Lane wrote: > I wrote: >> Just in a quick read-through of the patches, the only things I noticed > > Oh, a third thing: the patch places errcodes.txt under src/include, > which does not seem even approximately right.  src/backend/utils > seems like a saner plac

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-30 Thread Tom Lane
I wrote: > Just in a quick read-through of the patches, the only things I noticed Oh, a third thing: the patch places errcodes.txt under src/include, which does not seem even approximately right. src/backend/utils seems like a saner place for it. regards, tom lane -- Se

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-30 Thread Tom Lane
Robert Haas writes: > On Sun, Jan 30, 2011 at 5:47 PM, Tom Lane wrote: >> If you don't want to commit it yourself, I'll take it. > I'm happy to do it. I would have done it straight off, but thought > I'd give everyone one last chance to kvetch. Just in a quick read-through of the patches, the

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-30 Thread Robert Haas
On Sun, Jan 30, 2011 at 5:47 PM, Tom Lane wrote: > Robert Haas writes: >> I'll mark this one Ready for Committer. > > If you don't want to commit it yourself, I'll take it. I'm happy to do it. I would have done it straight off, but thought I'd give everyone one last chance to kvetch. -- Rober

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-30 Thread Jan Urbański
On 30/01/11 23:08, Robert Haas wrote: > On Wed, Jan 12, 2011 at 5:10 PM, Jan Urbański wrote: >> On 12/01/11 19:57, Jan Urbański wrote: >>> On 11/01/11 21:21, Jan Urbański wrote: On 11/01/11 18:59, Tom Lane wrote: > =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: >> On 11/01/11 17:11, Tom La

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-30 Thread Tom Lane
Robert Haas writes: > I'll mark this one Ready for Committer. If you don't want to commit it yourself, I'll take it. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/m

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-30 Thread Robert Haas
On Wed, Jan 12, 2011 at 5:10 PM, Jan Urbański wrote: > On 12/01/11 19:57, Jan Urbański wrote: >> On 11/01/11 21:21, Jan Urbański wrote: >>> On 11/01/11 18:59, Tom Lane wrote: =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: > On 11/01/11 17:11, Tom Lane wrote: Peter would probably be a bett

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-30 Thread Robert Haas
On Sun, Jan 30, 2011 at 5:23 PM, Jan Urbański wrote: > On 30/01/11 23:08, Robert Haas wrote: >> On Wed, Jan 12, 2011 at 5:10 PM, Jan Urbański wrote: >>> On 12/01/11 19:57, Jan Urbański wrote: On 11/01/11 21:21, Jan Urbański wrote: > On 11/01/11 18:59, Tom Lane wrote: >> =?UTF-8?B?SmF

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-11 Thread Jan Urbański
On 11/01/11 18:59, Tom Lane wrote: > =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: >> On 11/01/11 17:11, Tom Lane wrote: >>> Huh? Why in the world would the specific location of the #include have >>> anything to do with the problem? > >> I'v having a hard time convincing make to generate errcodes.h b

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-11 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: > On 11/01/11 17:11, Tom Lane wrote: >> Huh? Why in the world would the specific location of the #include have >> anything to do with the problem? > I'v having a hard time convincing make to generate errcodes.h before > compiling any .c file that includes

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-11 Thread Jan Urbański
On 11/01/11 17:11, Tom Lane wrote: > =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: >>> I tried wiring it into the build system, but failed, I can't figure out >>> which Makefiles should be updated in order to make errcodes.h and >>> plerrcodes.h generated headers. Could someone help with that? > >> Tr

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-11 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: >> I tried wiring it into the build system, but failed, I can't figure out >> which Makefiles should be updated in order to make errcodes.h and >> plerrcodes.h generated headers. Could someone help with that? > Trying a bit harder to make src/include/utils

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-11 Thread Jan Urbański
On 28/12/10 12:25, Jan Urbański wrote: > Here's the basic errcodes.txt file and three scripts to generate > errcodes.h, plerrcodes.h and part of errcodes.sgml. > > I tried wiring it into the build system, but failed, I can't figure out > which Makefiles should be updated in order to make errcodes.

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2010-12-28 Thread Jan Urbański
On 26/12/10 21:33, Jan Urbański wrote: > On 26/12/10 21:17, Tom Lane wrote: >> =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: >>> Makes sense. Wait, no, errcodes.sgml includes the entries for success >>> and warnings, but the plpgsql conditions list does not. So we need a >>> separate column to differen

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2010-12-26 Thread Jan Urbański
On 26/12/10 21:17, Tom Lane wrote: > =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: >> Makes sense. Wait, no, errcodes.sgml includes the entries for success >> and warnings, but the plpgsql conditions list does not. So we need a >> separate column to differentiate. > > OK. But not 0/1 please. Maybe '

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2010-12-26 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: > Makes sense. Wait, no, errcodes.sgml includes the entries for success > and warnings, but the plpgsql conditions list does not. So we need a > separate column to differentiate. OK. But not 0/1 please. Maybe 'E', 'W', or 'S' ? And again, fixed width co

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2010-12-26 Thread Robert Haas
On Dec 26, 2010, at 3:09 PM, Jan Urbański wrote: >> Things might line up nicer if the sqlstate is the first column. > > I was thinking of separating the values with tabs anyway, but I'm fine > with putting sqlstate first. +1 for putting SQLSTATE first. ...Robert -- Sent via pgsql-hackers mail

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2010-12-26 Thread Jan Urbański
On 26/12/10 20:57, Tom Lane wrote: > =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: >> How about a format like this then: > >> # Comment >> Section: Class 2F - SQL Routine Exception >> macro_name sqlstate plpgsqlname is_error > >> That is: # and blank lines are comments, lines starting with "Section:"

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2010-12-26 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: > How about a format like this then: > # Comment > Section: Class 2F - SQL Routine Exception > macro_name sqlstate plpgsqlname is_error > That is: # and blank lines are comments, lines starting with "Section:" > are section names (needed for SGML output),

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2010-12-26 Thread Jan Urbański
On 26/12/10 20:33, Tom Lane wrote: > =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: >> I then tried to do the same for plerrcodes.h, but found discrepancies. > > You shouldn't assume that errcodes.h necessarily includes all the info > needed to create the other two files. > > The way I'd envision this

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2010-12-26 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: > I then tried to do the same for plerrcodes.h, but found discrepancies. You shouldn't assume that errcodes.h necessarily includes all the info needed to create the other two files. The way I'd envision this working is that we have a master file containin

[HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2010-12-26 Thread Jan Urbański
On 26/12/10 18:17, Tom Lane wrote: > Robert Haas writes: >> On Sun, Dec 26, 2010 at 8:03 AM, Jan Urbański wrote: >>> See >>> https://github.com/wulczer/postgres/commit/44fc42b7708f23483156e4e0e1e321e68b2a7e2d#diff-0 >>> for something that maybe could be used as a basis to autogenerate >>> errcode