Re: [BUGS] Column Name parameter problem

2005-09-29 Thread vishal saberwal
hi tomas, The solution you sent worked, but i have another rissue related to this. I am trying to create a stored procedure that can accept TableName, ColumnName as parameter and return teh records pertaining to them. This way, i will not need to make the procedures for every table. But the proble

Re: [BUGS] Column Name parameter problem

2005-09-28 Thread Tomas Zerolo
On Wed, Sep 28, 2005 at 12:25:54PM -0700, vishal saberwal wrote: > hi, > > I am trying to create a stored procedure that takes a column name as > parameter and then uses it to sort the table for result set. > > create or replace function ptest_Sort_Select(varchar) returns setof ptest1 > as $$ > D

Re: [BUGS] Column Name parameter problem

2005-09-28 Thread David Fetter
On Wed, Sep 28, 2005 at 12:25:54PM -0700, vishal saberwal wrote: > hi, > > I am trying to create a stored procedure that takes a column name as > parameter and then uses it to sort the table for result set. You can't currently do this in PL/PgSQL. I believe this is scheduled for a fix in 8.2, bu

[BUGS] Column Name parameter problem

2005-09-28 Thread vishal saberwal
hi, I am trying to create a stored procedure that takes a column name as parameter and then uses it to sort the table for result set. create or replace function ptest_Sort_Select(varchar) returns setof ptest1 as $$ DECLARE     res ptest1%ROWTYPE; BEGIN     for res in         select * from ptest