On Fri, Jul 06, 2007 at 05:35:39PM +0100, Gary Stainburn wrote:
> 
> I want to be able to do away with the first line of the code, and create a 
> select statement that would generate the three rows first, followed by the 
> rows from the table I'm using. I want to be able to do the same job without 
> having to pre-load the array.

Oh, I see.

> In other words, what's the best way to inject pre-defined rows into a select 
> statement.

Probably a UNION statement.  Something like

SELECT 'something'::text as a, 'else'::text as b, 'and other'::text as c UNION 
SELECT a::text, b::text, c::text FROM sometable WHERE [criteria]

The casts might not be needed, of course.

A

-- 
Andrew Sullivan  | [EMAIL PROTECTED]
The plural of anecdote is not data.
                --Roger Brinner

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to