From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | dusan(dot)djuric(at)istratech(dot)hr, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #16977: SET LC_TIME TO local_variable don't work |
Date: | 2021-04-22 13:42:55 |
Message-ID: | CAKFQuwbQL4Kxe+bWCqpYEvLPoJ+icAM+av84z0OdTUJrqpK7dw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, Apr 22, 2021 at 6:26 AM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 16977
> Logged by: Dusan Djuric
> Email address: dusan(dot)djuric(at)istratech(dot)hr
> PostgreSQL version: 13.2
> Operating system: Windows 10
> Description:
>
> -- THIS DON'T WORK!
>
> SET LC_TIME TO l_lc_time;
>
>
> -- THIS WORKS!
>
> l_lc_time := p_parameter;
>
I don't think this next line isn't doing what you think...
> SET LC_TIME TO l_lc_time;
> IF l_lc_time = 'hr_HR.UTF8' THEN
> SET LC_TIME TO 'hr_HR.UTF8';
> END IF;
> IF l_lc_time = 'en_EN.UTF8' THEN
> SET LC_TIME TO 'en_EN.UTF8';
> END IF;
>
>
This isn't a bug. The SQL Command "SET" is not something that can take a
parameter. Doing "EXECUTE sql_string;" is probably the simplest solution -
build the SET command as a string and execute it.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-04-22 13:50:29 | Re: BUG #16976: server crash when deleting via a trigger on a foreign table |
Previous Message | Tom Lane | 2021-04-22 13:24:19 | Re: BUG #16976: server crash when deleting via a trigger on a foreign table |