Re: How to update upper-bound of tstzrange ?

From: Kashif Zeeshan <kashi(dot)zeeshan(at)gmail(dot)com>
To: Laura Smith <n5d9xq3ti233xiyif2vp(at)protonmail(dot)ch>
Cc: postgre <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to update upper-bound of tstzrange ?
Date: 2024-05-20 10:48:53
Message-ID: CAAPsdhfv3h0BQYkvwjXXsOssXmLNSGSDj=Huo7eiGAFBv30Jgw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

Try this one.

UPDATE foo
SET bar_times = bar_times + INTERVAL '1 hour'
WHERE bar_id = 'abc';

Regards
Kashif Zeeshan
Bitnine Global

On Mon, May 20, 2024 at 3:30 PM Laura Smith <
n5d9xq3ti233xiyif2vp(at)protonmail(dot)ch> wrote:

> Could someone kindly help me out with the correct syntax ?
>
> My first thought was the below but that doesn't work:
>
> update foo set upper(bar_times)=upper(bar_times)+interval '1' hour where
> bar_id='abc';
> ERROR: syntax error at or near "("
> LINE 1: update event_sessions set upper(bar_times)=upper(bar_ti...
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2024-05-20 11:01:05 Re: signal 11: Segmentation fault ; query constraint list; pg16.3
Previous Message PetSerAl 2024-05-20 10:36:08 Re: pg_dump and not MVCC-safe commands