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 withou
Gary Stainburn wrote:
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 o
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 obvious
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
Hi folks.
In PHP I often do things such as:
$wpartners=array('all'=>'All','sel'=>'Current','mine'=>'Mine');
foreach(
loadhash("select p_id as key, p_name as value
from partners order by p_name"
)
as $key=>$dets) {
$wpartners[$key]=$dets;
}
I would like to do something like this:
create function x(varchar) returns setof int4 as
'select * from $1;' language 'sql';
Unfortunately, the parser drops me back: I cannot use any parameters after
the keyword "from". How to solve this? A solution in PL/PgSQL would be
also nice.
Thanks in adv