Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 102996

PL/pgSQL is the default procedural language for PostgreSQL. Questions about PL/pgSQL should probably be tagged [PostgreSQL] as well.

2 votes
Accepted

Make a temporary table visible for a function inside a function (or a subfunction)

You can pass the name of the table: create or replace function f2(p_table_name text) returns text language plpgsql as $body$ begin execute $$insert into $$||quote_ident(p_table_name)||$$ (c1) values … ('text1');$$; return 'ok'; end; $body$; create or replace function f1() returns text language plpgsql as $body$ declare v1 text; begin create temporary table t1 ( c1 text ); perform …
Emilio Platzer's user avatar