pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: pgsql-sql@postgresql.org
Subject: Re: select from table and add rows.
Date: Fri, 6 Jul 2007 17:35:39 +0100
Message-ID: <200707061735.39592.gary.stainburn@ringways.co.uk> (raw)
In-Reply-To: <20070706150257.GS20115@phlogiston.dyndns.org>
References: <200707061425.09074.gary.stainburn@ringways.co.uk>
	<20070706150257.GS20115@phlogiston.dyndns.org>

On Friday 06 July 2007 16:02, Andrew Sullivan wrote:
> On Fri, Jul 06, 2007 at 02:25:08PM +0100, Gary Stainburn wrote:
> > This sets up an array with some pseudo values and then populates it with
> > *proper* values from a table.
> >
> > How's the best way to do this all within SQL.
>
> I'm obviously not understanding the question properly, because I
> think you want ot set up a PHP array with values from your table,
> without using PHP.  Which would of course make no sense.  Do you
> mean, how do you populate an array data type with data from individual
> database columns?
>
> A

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.

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


-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     



view thread (5+ messages)  latest in thread

Message-ID: <200707061735.39592.gary.stainburn@ringways.co.uk>
Permalink:  ../200707061735.39592.gary.stainburn@ringways.co.uk/
Also on:    postgresql.org/message-id/200707061735.39592.gary.stainburn@ringways.co.uk

 · 

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: gary.stainburn@ringways.co.uk
  Subject: Re: select from table and add rows.
  In-Reply-To: <200707061735.39592.gary.stainburn@ringways.co.uk>

* 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