Bug in information_schema: column names don't match spec

Lists: pgsql-hackers
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Bug in information_schema: column names don't match spec
Date: 2010-10-08 15:19:40
Message-ID: 23538.1286551180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

While reading the proposed triggers-on-views patch I noticed that
information_schema.sql defines these columns in the TRIGGERS view:

CAST(
CASE WHEN t.tgtype & 2 = 2 THEN 'BEFORE' WHEN t.tgtype & 64 = 64 THEN 'INSTEAD OF' ELSE 'AFTER' END
AS character_data) AS condition_timing,
CAST(null AS sql_identifier) AS condition_reference_old_table,
CAST(null AS sql_identifier) AS condition_reference_new_table,
CAST(null AS sql_identifier) AS condition_reference_old_row,
CAST(null AS sql_identifier) AS condition_reference_new_row,

In SQL:2008 I see the corresponding columns named as

ACTION_TIMING, ACTION_REFERENCE_OLD_TABLE,
ACTION_REFERENCE_NEW_TABLE, ACTION_REFERENCE_OLD_ROW,
ACTION_REFERENCE_NEW_ROW,

Was this just a thinko in our transcription, or did they rename the view
columns somewhere along the line?

Perhaps more to the point, what shall we do about it? Just renaming the
view columns is easy enough, but should we try to do something to limit
the impact on existing clients?

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Bug in information_schema: column names don't match spec
Date: 2010-10-12 17:31:26
Message-ID: 1286904686.23137.6.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On fre, 2010-10-08 at 11:19 -0400, Tom Lane wrote:
> Was this just a thinko in our transcription, or did they rename the
> view columns somewhere along the line?

I suppose you figured this out already, but in some of my older draft
copies, the column did indeed have a different name. The other columns
were just copying mistakes, apparently.

> Perhaps more to the point, what shall we do about it? Just renaming
> the view columns is easy enough, but should we try to do something to
> limit the impact on existing clients?

I wouldn't worry about it unless we get complaints. Users can change
the view easily enough if they need.