> On Friday 20 Sep 2002 5:52 pm, Chris Gamache wrote:
>> This would be nice to be able to do...
>>
>> insert into test_table (a,b) select random()::text as "myrandom",
>> encode("myrandom",'base64');
You can do this sort of thing with a level of subselect:
insert into test_table (a,b)
select myrandom, encode(myrandom, 'base64')
from (select random()::text as myrandom) ss;
Trying to let one SELECT output expression refer to another one on the
same level strikes me as a really bad idea, though.
regards, tom lane