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

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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jan Urbański <wulczer(at)wulczer(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Shigeru HANADA <hanada(at)metrosystems(dot)co(dot)jp>
Subject: Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)
Date: 2011-01-30 22:08:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committerspgsql-hackers
On Wed, Jan 12, 2011 at 5:10 PM, Jan Urbański <wulczer(at)wulczer(dot)org> 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==?= <wulczer(at)wulczer(dot)org> writes:
>>>>> On 11/01/11 17:11, Tom Lane wrote:
>>>> Peter would probably be a better person than me to answer that, but I
>>>> imagine that what you want is similar to what src/backend/Makefile does
>>>> for parser/gram.h, only applied at the src/ level or maybe even the
>>>> root.
>>> And actually, if I change my rule to read:
>>> $(SUBDIRS:%=all-%-recurse): $(top_builddir)/src/include/utils/errcodes.h
>>> it works. Now whether that's acceptable or not is another thing entirely...
>> And so I came up with three patches to make errcodes.h, plerrcodes.h and
>> errcodes.sgml (respectively) generated files.
> Darn, forgot about MSVC again. See
> for details on how this works.
> Attached are the previous 3 patches and a fourth one that adds MSVC support.

I think these look good.  I'm not sure there's any value in stripping
the duplicates out of plerrcodes.h, though, even if they were

-	"array_element_error", ERRCODE_ARRAY_ELEMENT_ERROR
-	"datetime_value_out_of_range", ERRCODE_DATETIME_VALUE_OUT_OF_RANGE
-	"undefined_cursor", ERRCODE_UNDEFINED_CURSOR
-	"undefined_database", ERRCODE_UNDEFINED_DATABASE
-	"undefined_pstatement", ERRCODE_UNDEFINED_PSTATEMENT
-	"undefined_schema", ERRCODE_UNDEFINED_SCHEMA

I'm attaching a few other proposed adjustments.

Robert Haas
The Enterprise PostgreSQL Company

Attachment: errcodes-adjustments.patch
Description: text/x-diff (2.2 KB)

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2011-01-30 22:12:35
Subject: Re: log_hostname and pg_stat_activity
Previous:From: Thom BrownDate: 2011-01-30 22:07:08
Subject: Re: WIP: RangeTypes

pgsql-committers by date

Next:From: Tom LaneDate: 2011-01-30 22:12:10
Subject: pgsql: Make reduce_outer_joins() smarter about semijoins.
Previous:From: Magnus HaganderDate: 2011-01-30 20:43:30
Subject: pgsql: Add option to include WAL in base backup

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