Re: [SQL] Question on pgpsql function

2007-04-08 Thread Adrian Klaver
On Sunday 08 April 2007 12:47 pm, Karthikeyan Sundaram wrote: > Hi Everybody, > >I am using Postgres 8.1.0 and I have a requirement. > > I have a table > > create table weekly_tbl (id int, week_flag bit(7) not null default > '111'); > > I want to create a function like this > > create fu

[SQL] Question on pgpsql function

2007-04-08 Thread Karthikeyan Sundaram
Hi Everybody, I am using Postgres 8.1.0 and I have a requirement. I have a table create table weekly_tbl (id int, week_flag bit(7) not null default '111'); I want to create a function like this create function week_func (int) returns weekly_tbl as $$ select id, s