pgsql: A long time ago, Peter pointed out that ruleutils.c didn't dump

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: A long time ago, Peter pointed out that ruleutils.c didn't dump
Date: 2008-01-06 01:03:23
Message-ID: 20080106010323.5749B754108@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
A long time ago, Peter pointed out that ruleutils.c didn't dump simple
constant ORDER/GROUP BY entries properly:
http://archives.postgresql.org/pgsql-hackers/2001-04/msg00457.php
The original solution to that was in fact no good, as demonstrated by
today's report from Martin Pitt:
http://archives.postgresql.org/pgsql-bugs/2008-01/msg00027.php
We can't use the column-number-reference format for a constant that is
a resjunk targetlist entry, a case that was unfortunately not thought of
in the original discussion. What we can do instead (which did not work
at the time, but does work in 7.3 and up) is to emit the constant with
explicit ::typename decoration, even if it otherwise wouldn't need it.
This is sufficient to keep the parser from thinking it's a column number
reference, and indeed is probably what the user must have done to get
such a thing into the querytree in the first place.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
pgsql/src/backend/utils/adt:
ruleutils.c (r1.235.2.3 -> r1.235.2.4)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.235.2.3&r2=1.235.2.4)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-01-06 01:03:31 pgsql: A long time ago, Peter pointed out that ruleutils.c didn't dump
Previous Message Tom Lane 2008-01-06 01:03:16 pgsql: A long time ago, Peter pointed out that ruleutils.c didn't dump