pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Denis Bucher <dbucher@niftycom.com>
To: PGSQL-SQL <pgsql-sql@postgresql.org>
Subject: Re: Possible to create a *really* virtual table ?
Date: Tue, 06 Nov 2001 13:21:46 +0100
Message-ID: <5.1.0.14.0.20011106132134.02840690@mail.niftycom.com> (raw)
At 15:02 05.11.01 +0100, you wrote:
Hello !
>Is it possible to create a virtual table, NOT a view ?
>
>For example :
>SELECT *
>FROM
>(VALUES ('orange', 'orange'), ('apple', 'red'),
>('banana', 'yellow'))
>AS Fruits_And_Colors(fruit, color);
>I.e. to do a request on a non-real table ?
>I want to have the following virtual table :
>TABLE b
>id | b
>------------
>1 | 't'
>2 | 'f'
>
>Is it possible in PostgreSQL ?
Ok I found the answer, it is possible !
SELECT text 'a' AS "Text" UNION SELECT 'b';
Denis
view thread (2+ messages)
Message-ID: <5.1.0.14.0.20011106132134.02840690@mail.niftycom.com> Permalink: ../5.1.0.14.0.20011106132134.02840690@mail.niftycom.com/ Also on: postgresql.org/message-id/5.1.0.14.0.20011106132134.02840690@mail.niftycom.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-sql@postgresql.org Cc: dbucher@niftycom.com Subject: Re: Possible to create a *really* virtual table ? In-Reply-To: <5.1.0.14.0.20011106132134.02840690@mail.niftycom.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox