Re: Creating unique or "internal-use-only" column names (ColumnRef)

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Peter Moser <pitiz29a(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Creating unique or "internal-use-only" column names (ColumnRef)
Date: 2015-09-07 13:28:06
Message-ID: 20150907132806.GN2912@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Moser wrote:
> Good afternoon,
> is it possible to create unique column names or to give column names inside
> the parser phase that do not interfer with the outside world, i.e. with
> column names from tables or aliases given by the user.
>
> Some short background:
> I created my own from-clause-item, that gets rewritten into a sub-query. I
> do this because I want to re-use existing code as much as possible. The
> rewritten sub-query gets transformed with "transformRangeSubselect"...
> Within this sub-query I need 3 columns that shouldn't interfer with columns
> from the input. We refer to them from a JOIN-ON clause and an ORDER-BY
> clause.

This seems pretty much the same as a junk attribute, if I understand you
correctly. I suggest given a look at how those work.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2015-09-07 13:28:40 Re: WIP: Access method extendability
Previous Message Thomas Munro 2015-09-07 13:11:21 Re: synchronous_commit = apply