Received: from narn.deckpoint.ch (narn.deckpoint.ch [194.38.160.133]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fA6CNFq43796 for ; Tue, 6 Nov 2001 07:23:15 -0500 (EST) (envelope-from dbucher@niftycom.com) Received: from orange.niftycom.com (hidden-user@[213.162.13.76]) by narn.deckpoint.ch (8.11.6/8.11.6) with ESMTP id fA6CNHW04291 for ; Tue, 6 Nov 2001 13:23:17 +0100 Received: from violet.niftycom.com ([192.168.200.4]) by orange.niftycom.com (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) with ESMTP id fA6CNG532307 for ; Tue, 6 Nov 2001 13:23:17 +0100 X-Authentication-Warning: orange.niftycom.com: Host [192.168.200.4] claimed to be violet.niftycom.com Message-Id: <5.1.0.14.0.20011106132134.02840690@mail.niftycom.com> X-Sender: dbucher@mail.niftycom.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 06 Nov 2001 13:21:46 +0100 To: PGSQL-SQL From: Denis Bucher Subject: Re: Possible to create a *really* virtual table ? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200111/62 X-Sequence-Number: 5446 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