Re: [SQL] Documenting a DB schema

2008-03-05 Thread Professor Flávio Brito
Hi You may try this. CREATE TYPE tabela_estrutura AS (esquema text, tabela text, campo text, tipo text, valor text, autoincremento boolean); ALTER TYPE tabela_estrutura OWNER TO postgres; CREATE OR REPLACE FUNCTION dados_tabela(character varying) RETURNS SETOF tabela_e

[SQL] Function returns error (view) (RESOLVED)

2008-03-01 Thread Professor Flávio Brito
N; END $BODY$ LANGUAGE 'plpgsql' VOLATILE; 2008/2/28, Bart Degryse <[EMAIL PROTECTED]>: > > Please send the complete DDL for your function and the tables it uses. > Also inform us of the database version you're using. > > >>> "Professor Flávio Brit

Re: [SQL] Function returns error (view) (RESOLVED)

2008-02-28 Thread Professor Flávio Brito
N; END $BODY$ LANGUAGE 'plpgsql' VOLATILE; 2008/2/28, Bart Degryse <[EMAIL PROTECTED]>: > > Please send the complete DDL for your function and the tables it uses. > Also inform us of the database version you're using. > > >>> "Professor Flávio Brit

Re: [SQL] Function returns error (view)

2008-02-27 Thread Professor Flávio Brito
ame: if you copied my suggestion it is > seach_... and not search_... > > I would also suggest you replace the > ...t.cod_user IN (subselect) > by a join construction. I think it's more performant. > > > >>> "Professor Flávio Brito" <[EMAIL PROTECTE

Re: [SQL] Function returns error (view)

2008-02-26 Thread Professor Flávio Brito
not found (%)', USER_FOO; > END IF; > RETURN; > END > $BODY$ > LANGUAGE 'plpgsql' VOLATILE; > > > >>> "Professor Flávio Brito" <[EMAIL PROTECTED]> 2008-02-26 17:32 > >>> > Hi > > Don't know why I can'

Re: [SQL] Function returns error (view)

2008-02-26 Thread Professor Flávio Brito
Hi Colin When I translated from Portuguese to English I forgot a letter, but using the corrected name I received an error. 2008/2/26, Colin Wetherbee <[EMAIL PROTECTED]>: > > Professor Flávio Brito wrote: > > When I Test my view I receive > > > > SELECT

[SQL] Function returns error (view)

2008-02-26 Thread Professor Flávio Brito
Hi Don't know why I can't receive a return like my view fields (I'm newbie in plpgsql). Postgresql returns me a erro . How can I received a answer like my view structure? When I Test my view I receive SELECT seach_password('user_login_foo') My view returns me 25746;"MARCELO ";"bio1";"bio1";"2