On Wed, 27 Aug 2003, Kumar wrote: > Dear Friends, > > I am newbie to Postgres. I am running 7.3.4 on Linux 7.3. I am using > Pgadmin tool. I need to return the table rows via record set. > > Create table t1 (c1 int, c2 varchar, c3 varchar); > > Create or Replace function sel_t1 () returns setof records as '
Why not setof t1? > select c1, c2, c3 from t1; > ' Language SQL; > > It was fine and created a function. while i execute it as > > select sel_t1; You probably want select * from sel_t1() as tab(c1 int, c2 varchar, c3 varchar) (if you return setof record) or select * from sel_t1(); (if you return setof t1) ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org