Re: Alias name from subquery

Поиск
Список
Период
Сортировка
От Dot Yet
Тема Re: Alias name from subquery
Дата
Msg-id 93bc4af40809300919l165e2a2yfe343c90856dd205@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Alias name from subquery  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список 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.

rgds,
dotyet

On Tue, Sep 30, 2008 at 12:10 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
On Tue, Sep 30, 2008 at 8:29 AM, Felix Homann <fexpop@onlinehome.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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

В списке pgsql-general по дате отправления:

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Alias name from subquery
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: MySQL to Postgresql schema conversion