Thiago Boufleuhr wrote:

> CREATE OR REPLACE FUNCTION teste_pk (text) RETURNS text
>      AS 'select proname, proargtypes from pg_proc;'
> LANGUAGE 'sql'
> 
Função errada... Com uma função similar não consegui reproduzir o seu 
erro. Podes me enviar a função exata (pode ser em privado). Estou 
curioso para saber a saída do \d pg_proc e de um select * from pg_proc 
where proname ~ 'funcaoteste';

template1=# select version();
                                  version
-------------------------------------------------------------------------
  PostgreSQL 8.1.11 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2
(1 row)

Time: 0,597 ms
template1=# create or replace function test_pk () returns text as 
'select proname::text from pg_proc;' language sql;
CREATE FUNCTION
Time: 5,113 ms
template1=# create or replace function test_pk () returns text as 
'select proname::text from pg_proc;' language sql;
CREATE FUNCTION
Time: 1,706 ms
template1=# create or replace function test_pk () returns text as 
'select proname::text from pg_proc;' language sql;
CREATE FUNCTION
Time: 1,604 ms
template1=# create or replace function test_pk () returns text as 
'select proname::text from pg_proc;' language sql;
CREATE FUNCTION
Time: 2,345 ms
template1=# select test_pk();
  test_pk
---------
  boolin
(1 row)

Time: 0,911 ms
template1=#


-- 
   Euler Taveira de Oliveira
   http://www.timbira.com/

_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a