Hi all.
It seems I cannot use a temporary function.
I know there's no "CREATE TEMP FUNCTION".
But while I can do
tmp2=# CREATE FUNCTION pg_temp.x( OUT b BOOL )
language PLPGSQL
AS $L0$
BEGIN
b := TRUE;
END;
$L0$;
SET search_path TO pg_temp,"$user", public;
the following fails:
tmp2=# SELECT * FROM x();
LINE 1: select * from x();
^
HINT: No function matches the given name and argument types. You
might need to add explicit type casts.
tmp2=# \df+ x
List of functions
Schema | Name | Result data type | Argument data types | Type |
Volatility | Parallel | Owner | Security | Access privileges |
Language | Source code | Description
--------+------+------------------+---------------------+------+------------+----------+-------+----------+-------------------+----------+-------------+-------------
(0 rows)
tmp2=# \df+ pg_temp.x
List of functions
Schema | Name | Result data type | Argument data types | Type |
Volatility | Parallel | Owner | Security | Access privileges |
Language | Source code | Description
--------+------+------------------+---------------------+------+------------+----------+-------+----------+-------------------+----------+-------------+-------------
(0 rows)
but this succeeds:
tmp2=# select * from pg_temp.x();
b
---
t
(1 row)
I think I am doing/thinking something wrong.
But what?
TALIA!
--
Vincenzo Romano - NotOrAnd.IT
Information Technologies
--
NON QVIETIS MARIBVS NAVTA PERITVS