Re: pre-MED

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pre-MED
Date: 2008-11-03 15:24:40
Message-ID: 26892.1225725880@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> ... I'm not even real sure what
> all the issues would be, but I'm pretty sure that subplans are just the
> tip of the iceberg.

Another issue is that ruleutils responds to column aliasing, as indeed
it must to generate correct output for rules:

regression=# explain select * from tenk1 a where a.unique1 = 42;
QUERY PLAN
-------------------------------------------------------------------------------
Index Scan using tenk1_unique1 on tenk1 a (cost=0.00..8.27 rows=1 width=244)
Index Cond: (unique1 = 42)
(2 rows)

regression=# explain select * from tenk1 a(foo) where a.foo = 42;
QUERY PLAN
-------------------------------------------------------------------------------
Index Scan using tenk1_unique1 on tenk1 a (cost=0.00..8.27 rows=1 width=244)
Index Cond: (foo = 42)
(2 rows)

This would be a bit of a problem for dblink or similar functions, which
would have no way at all to know how the column names that they are
dealing in got renamed.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-11-03 16:00:29 Re: PostgreSQL + Replicator developer meeting 10/28
Previous Message Dickson S. Guedes 2008-11-03 15:22:21 Re: Simple postgresql.conf wizard