Skip site navigation (1) Skip section navigation (2)

Re: Alias name from subquery

From: "Dot Yet" <dot(dot)yet(at)gmail(dot)com>
To: "General PostgreSQL List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Alias name from subquery
Date: 2008-09-30 16:19:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
From what i know, Aliases are literals, they are not variables, hence they
cannot be derived from something. you can derive them outside the scope of
normal SQL by using functions or shell scripts, but probably not inside an
SQL context.


On Tue, Sep 30, 2008 at 12:10 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>wrote:

> On Tue, Sep 30, 2008 at 8:29 AM, Felix Homann <fexpop(at)onlinehome(dot)de>
> wrote:
> > _But_, I don't want to give the alias explicitely, instead it should be
> > taken from a second table 'colnames', i.e. something like the line I sent
> in
> > my initial mail. Any idea?
> Then you'll have to build a query in plpgsql and execute it to get
> what you want.  You can't do what you're trying to do in normal SQL.
> At least I don't think it's possible.
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:

In response to

pgsql-general by date

Next:From: Merlin MoncureDate: 2008-09-30 16:44:02
Subject: Re: MySQL to Postgresql schema conversion
Previous:From: Scott MarloweDate: 2008-09-30 16:10:32
Subject: Re: Alias name from subquery

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group