Replies: 2 comments 1 reply
-
ne 24. 3. 2024 v 5:55 odesílatel Nick-Nal ***@***.***> napsal:
Hi
Can anyone describe what's different between functions with and without
_tb postfix?
Couldn't find any description in the docs about that and it's unclear to
me from the code with my limited knowledge of C :)
Thanks in advance
_tb means table
CREATE OR REPLACE FUNCTION public.buggy()
RETURNS void
LANGUAGE plpgsql
AS $function$
begin
insert into nonexists values(10,20);
end;
$function$
(2024-03-24 08:12:07) postgres=# select * from
plpgsql_check_function('buggy');
┌─────────────────────────────────────────────────────────────────┐
│ plpgsql_check_function │
╞═════════════════════════════════════════════════════════════════╡
│ error:42P01:3:SQL statement:relation "nonexists" does not exist │
│ Query: insert into nonexists values(10,20) │
│ -- ^ │
└─────────────────────────────────────────────────────────────────┘
(3 rows)
(2024-03-24 08:12:27) postgres=# \x
Expanded display is on.
(2024-03-24 08:12:33) postgres=# select * from
plpgsql_check_function_tb('buggy');
┌─[ RECORD 1 ]─────────────────────────────────────┐
│ functionid │ buggy │
│ lineno │ 3 │
│ statement │ SQL statement │
│ sqlstate │ 42P01 │
│ message │ relation "nonexists" does not exist │
│ detail │ ∅ │
│ hint │ ∅ │
│ level │ error │
│ position │ 13 │
│ query │ insert into nonexists values(10,20) │
│ context │ ∅ │
└────────────┴─────────────────────────────────────┘
—
… Reply to this email directly, view it on GitHub
<#170>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEFO4YNK2ZND6XK42TI7DDYZZMCRAVCNFSM6AAAAABFFKHKRCVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGQYTGNRZGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
ne 24. 3. 2024 v 8:22 odesílatel Nick-Nal ***@***.***> napsal:
Oh man, I missed the most obvious thing - return type. Should've tried
before asking :)
My bad, sorry for bothering
:-)
no problem
… —
Reply to this email directly, view it on GitHub
<#170 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEFO42TGN3OMCH6ZLI6BJTYZZ5K7AVCNFSM6AAAAABFFKHKRCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DQOJRGEZDC>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
Can anyone describe what's different between functions with and without _tb postfix?
Couldn't find any description in the docs about that and it's unclear to me from the code with my limited knowledge of C :)
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions