pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: adivi <adivi@maximizelearning.com>
To: pgsql-sql@postgresql.org
Subject: executing a function
Date: Wed, 9 Jul 2003 10:59:26 +0530
Message-ID: <006b01c345db$10851f60$5d0410ac@maximizelearning.com> (raw)

Hi,
    i doubt if this should 've gone to the novice group, but it's all sql


    i have a function that returns a setof rows from a table testtab :
____________________________________________________________________________________
   CREATE FUNCTION "public"."gettesttab" () RETURNS SETOF public.testtab AS'
        select * from TestTab;
    'LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
____________________________________________________________________________________

"volatile" etc. was added by the EMS PostGreSql Manager.

i try to execute this function

but a call 
"select * from gettesttab();"
or
"select gettesttab();"
return the error

ERROR:  syntax error at or near "select"

the postmaster window also logs the erros:
ERROR:  syntax error at or near "select"
WARNING:  plpgsql: ERROR during compile of gettesttab near line 1

can simeone please help me out with this.  

thanks in advance
    
regards
-pawan

view thread (2+ messages)  latest in thread

Message-ID: <006b01c345db$10851f60$5d0410ac@maximizelearning.com>
Permalink:  ../006b01c345db$10851f60$5d0410ac@maximizelearning.com/
Also on:    postgresql.org/message-id/006b01c345db$10851f60$5d0410ac@maximizelearning.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: adivi@maximizelearning.com
  Subject: Re: executing a function
  In-Reply-To: <006b01c345db$10851f60$5d0410ac@maximizelearning.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox