[v10] CREATE TEMP FUNCTION/CREATE FUNCTION PG_TEMP.X

Поиск
Список
Период
Сортировка
От Vincenzo Romano
Тема [v10] CREATE TEMP FUNCTION/CREATE FUNCTION PG_TEMP.X
Дата
Msg-id CAHjZ2x72-3sSX1Nj-05WguMpp4itUacNHB+96wss5EU31UnaiA@mail.gmail.com
обсуждение исходный текст
Ответы Re: [v10] CREATE TEMP FUNCTION/CREATE FUNCTION PG_TEMP.X  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Matt Zagrabelny
Дата:
Сообщение: Re: problems with postgresql 10.1 hba_conf on fedora 27
Следующее
От: Jeremy Finzel
Дата:
Сообщение: Re: Deadlock with one table - PostgreSQL is doing it right