Re: [GENERAL] select as params to function

2012-02-17 Thread Andy Colson
On 2/17/2012 2:49 PM, Merlin Moncure wrote: On Fri, Feb 17, 2012 at 2:32 PM, Andy Colson wrote: On 2/17/2012 2:11 PM, Pavel Stehule wrote: Hello PostgreSQL has no table data type. You can use a array of records instead and then select fx((select array(select * from tab))); select fx(arra

Re: [GENERAL] select as params to function

2012-02-17 Thread Merlin Moncure
On Fri, Feb 17, 2012 at 2:32 PM, Andy Colson wrote: > On 2/17/2012 2:11 PM, Pavel Stehule wrote: >> >> Hello >> >> PostgreSQL has no table data type. You can use a array of records instead >> >> and then >> >> select fx((select array(select * from tab))); select fx(array(select t from tab t)); f

Re: [GENERAL] select as params to function

2012-02-17 Thread Andy Colson
On 2/17/2012 2:11 PM, Pavel Stehule wrote: Hello PostgreSQL has no table data type. You can use a array of records instead and then select fx((select array(select * from tab))); regards Pavel Stehule 2012/2/17 Andy Colson: Hi all, Trying to clean up some data so I wrote myself a function

Re: [GENERAL] select as params to function

2012-02-17 Thread Pavel Stehule
Hello PostgreSQL has no table data type. You can use a array of records instead and then select fx((select array(select * from tab))); regards Pavel Stehule 2012/2/17 Andy Colson : > Hi all, > > Trying to clean up some data so I wrote myself a function which will insert > the new stuff okay b

Re: [GENERAL] select as

2004-12-23 Thread Greg Stark
Bambero <[EMAIL PROTECTED]> writes: > I don't know what fields are in the table so: > > select fieldname as 1, fieldname2 as 2 > > is useless. slo=> create table x (foo text,bar text,baz text); CREATE TABLE slo=> select * from (select * from x) as x ("1","2","3"); 1 | 2 | 3 ---+---+--- (0 ro

Re: [GENERAL] select as

2004-12-23 Thread Michael Fuhr
On Thu, Dec 23, 2004 at 06:37:14PM +, Bambero wrote: > Is there any easy way to select all fields from table (*) but the result > should looks like this: > > 1|2|3 > +-+-- > asas| asd | dasd > ada | ads | dasa > > Column name should be a number of column. Why do you n