| From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
|---|---|
| To: | Noah Misch <noah(at)leadboat(dot)com> |
| Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: SQL-standard function body |
| Date: | 2021-06-06 07:32:20 |
| Message-ID: | 20210606073220.42ytzr6r5bbhqh3q@nol |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, Jun 05, 2021 at 09:44:18PM -0700, Noah Misch wrote:
> On Wed, Apr 07, 2021 at 09:55:40PM +0200, Peter Eisentraut wrote:
> > Committed. Thanks!
>
> I get a NULL pointer dereference if the function body has a doubled semicolon:
>
> create function f() returns int language sql begin atomic select 1;; end;
You don't even need a statements to reproduce the problem, a body containing
only semi-colon(s) will behave the same.
Attached patch should fix the problem.
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Fix-SQL-standard-body-empty-statements-handling.patch | text/x-diff | 2.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Omar Kilani | 2021-06-06 10:54:48 | Strangeness with UNIQUE indexes and UTF-8 |
| Previous Message | Julien Rouhaud | 2021-06-06 07:13:12 | Re: Misplaced superuser check in pg_log_backend_memory_contexts() |