From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Jim Nasby <jim(at)nasby(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pauleg(dot)carter(at)gmail(dot)com" <pauleg(dot)carter(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: bit-strings with white space |
Date: | 2018-04-23 04:07:33 |
Message-ID: | CAKFQuwb8_UCJ75wEgkhV8ZQ02z2o2-zgaKCyP61ekO_Pqv6U-A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Sunday, April 22, 2018, Jim Nasby <jim(at)nasby(dot)net> wrote:
> On 4/22/18 12:18 PM, Tom Lane wrote:
>
>> regression=# select 'foo'
>> 'bar';
>> ?column?
>> ----------
>> foobar
>> (1 row)
>>
>> Perhaps there's something we could change to make this clearer,
>> but I'm not sure what.
>>
>
> I had no idea you could do that. While there's probably some wordy
> description that could explain this, I think an example is probably the
> best bet. Are there any other data types that work like this?
>
>
This structural "normalization" gets applied before types get involved.
Two literals only separated by a newline are concatenated together. Any
type name prefix, E or b prefix, :: cast, or cast() application then gets
applied to the combined literal.
The sql syntax section on this could maybe use another example or two but
does communicate the behavior reasonably well.
https://www.postgresql.org/docs/10/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2018-04-23 13:00:39 | Start with [ , end with ) |
Previous Message | Jim Nasby | 2018-04-23 03:50:50 | Re: bit-strings with white space |