Re: Postgres stored procedure errs while parsing JSONB object - Mailing list pgsql-sql

From Igor Shmukler
Subject Re: Postgres stored procedure errs while parsing JSONB object
Date
Msg-id CAA1SNA3Unj+F=JQZ8exZ9DH6uc+iTFkxeEO1N1FWhknQ-S47Vw@mail.gmail.com
Whole thread Raw
In response to Re: Postgres stored procedure errs while parsing JSONB object  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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.g.johnston@gmail.com> wrote:
>
> On Wednesday, May 20, 2020, Igor Shmukler <igor.shmukler@gmail.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.
>



pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Postgres stored procedure errs while parsing JSONB object
Next
From: Gary Stainburn
Date:
Subject: left outer join with count