Michael Fuhr wrote:
On Fri, Aug 04, 2006 at 06:44:16PM +0300, gustavo halperin wrote:
Michael Fuhr wrote:
Since the function has OUT parameters you can use "RETURNS SETOF record"
like this:
CREATE FUNCTION funcname() RETURNS SETOF record AS $$
$$ LANGUAGE SQL
What do you mean w
On Fri, Aug 04, 2006 at 06:44:16PM +0300, gustavo halperin wrote:
> Michael Fuhr wrote:
> >Since the function has OUT parameters you can use "RETURNS SETOF record"
> >like this:
> >
> >CREATE FUNCTION funcname() RETURNS SETOF record AS $$
> >
> >$$ LANGUAGE SQL
>
> What do you mean with the word "r
Michael Fuhr wrote:
[Please copy the mailing list on replies so others can contribute
to and learn from the discussion.]
On Fri, Aug 04, 2006 at 11:20:55AM +0300, gustavo halperin wrote:
Michael Fuhr wrote:
You've hardcoded the strings 'v_tbl_schm' and 'v_tbl_name' instead
of using the
[Please copy the mailing list on replies so others can contribute
to and learn from the discussion.]
On Fri, Aug 04, 2006 at 11:20:55AM +0300, gustavo halperin wrote:
> Michael Fuhr wrote:
> >You've hardcoded the strings 'v_tbl_schm' and 'v_tbl_name' instead
> >of using the function's arguments.
On Fri, Aug 04, 2006 at 06:16:41AM +0300, gustavo halperin wrote:
> *OK thank you, you right, but after write "public" I receive again an
> empty row, Why??.
[...]
> mydb=> CREATE OR REPLACE FUNCTION f_describe_tables (v_tbl_scm text,
> v_tbl_name text,
> mydb(> OUT text, OUT text) as
> mydb-> $
Ron St-Pierre wrote:
Check your spelling of public:
SELECT * FROM f_describe_tables('pubilc', 'mil_cien_diez');
Ron
*OK thank you, you right, but after write "public" I receive again an
empty row, Why??.
By the way I wrote a short function:*
/mydb=> SELECT c.column_name, c.data_type
mydb-> F
On Fri, Aug 04, 2006 at 01:51:19AM +0300, gustavo halperin wrote:
> In order to know the names and data types of the table "mil_cien_diez"
> from the schema "public" I run the next 'SELECT' but when I try to
> create a SQL function and after it I run it, I receive an empty row. Can
> you see the
"Cesar A. K. Grossmann" <[EMAIL PROTECTED]> writes:
> create function
> vinculoExportacao (varchar)
> returns setof
> as 'select codigo, nome, ''T'' as selected
> from cad_exportacao
> ...
> psql:tmp/teste2.sql:15: ERROR: parser: parse error at or near "as"
setof *what* ? The parser is expectin