From: | Igor Shmukler <igor(dot)shmukler(at)gmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Postgres stored procedure errs while parsing JSONB object |
Date: | 2020-05-20 15:10:17 |
Message-ID: | CAA1SNA3Unj+F=JQZ8exZ9DH6uc+iTFkxeEO1N1FWhknQ-S47Vw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hello David,
You are my hero. I added quotes in two places as:
- AS event_times(id INTEGER, "startDate" DATE, "endDate" DATE, times JSONB)
- (eid, showing.times, showing."startDate", showing."endDate")
It worked. I no longer get an error message.
Thank you,
Igor Shmukler
On Wed, May 20, 2020 at 11:04 AM David G. Johnston
<david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> On Wednesday, May 20, 2020, Igor Shmukler <igor(dot)shmukler(at)gmail(dot)com> wrote:
>>
>>
>> ...
>> FOR showing IN SELECT * FROM json_to_recordset(to_json(event_times))
>> AS show(id INTEGER,
>> times JSONB, startDate DATE, endDate DATE) LOOP
>> IF showing.id > 0 THEN
>> UPDATE
>> event_shows
>> SET
>> start_date = showing.startDate, end_date = showing.endDate,
>> times = showing.times
>>
>
>
> Try showing.”startDate” and showing.”endDate” ... (i.e., you need double quotes around the case-sensitive identifier)
>
> David J.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Gary Stainburn | 2020-05-29 16:09:16 | left outer join with count |
Previous Message | David G. Johnston | 2020-05-20 15:04:47 | Re: Postgres stored procedure errs while parsing JSONB object |