| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Bzzzz <lazyvirus(at)gmx(dot)com> |
| Cc: | pgsql-novice <pgsql-novice(at)postgresql(dot)org> |
| Subject: | Re: Can't find the right generated column syntax |
| Date: | 2019-11-26 03:58:29 |
| Message-ID: | CAKFQuwaURLKtX3mCvEjoK6dLnEsuPb3bTTxVURFbuUsUE2Akhg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
On Monday, November 25, 2019, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:
>
>
> On Monday, November 25, 2019, Bzzzz <lazyvirus(at)gmx(dot)com> wrote:
>
>>
>>
>> CREATE TABLE tst_timerange(a timestamptz, b timestamptz, c tstzrange
>> generated always as ( ('[a,b(') ) stored); ERROR: malformed range
>> literal: "[a,b(" LINE 1: ...b timestamptz, c tstzrange generated always
>> as ( ('[a,b(') )...
>>
>>
>>
> Also probably correct if you recognize that [( doesn’t make sense as a
> range boundary specification.
>
>
Nevermind this one - getting the quoting correct with a literal input
expression is why using the function is much easier. Even swapping ) for (
isn’t enough though its close - just need to get a and b to be treated as
column references.
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Laurenz Albe | 2019-11-26 07:10:19 | Re: Can't find the right generated column syntax |
| Previous Message | Bzzzz | 2019-11-26 03:39:42 | Re: Can't find the right generated column syntax |