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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Jan Urbański <wulczer@wulczer.org>, pgsql-hackers@postgresql.org, Shigeru HANADA <hanada@metrosystems.co.jp>
Date: 2011-01-30T23:19:54Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add foreign data wrapper error code values for SQL/MED.

Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, Jan 30, 2011 at 5:47 PM, Tom Lane <tgl@sss.pgh.pa.us> 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 only things I noticed
were (1) lack of a PGDG copyright notice in errcodes.txt, and (2)
in your proposed change to generate-errcodes.pl:

+    # Omit a comment for each section header
+    if (/^Section:(.*)/) {
+		my $header = $1;
+		$header =~ s/^\s+//;
+		print "\n/* $header */\n";
+		next;
+	}

ITYM "Emit" not "Omit"?

			regards, tom lane