From: | Japin Li <japinli(at)hotmail(dot)com> |
---|---|
To: | 咸🐟 <2437705447(at)qq(dot)com> |
Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se>, Jet Zhang <jet(dot)cx(dot)zhang(at)hotmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Bug of psql meta-command \sf & \sv |
Date: | 2023-09-27 14:16:47 |
Message-ID: | MEYP282MB16690BF5E7B144B6EF610897B6C2A@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, 27 Sep 2023 at 20:35, 咸🐟 <2437705447(at)qq(dot)com> wrote:
> https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
> I don't think this meets the documentation's definition of an identifier. Semicolons should not be used this way here.(Excuse me, I need to test the email function.)
>
In PostgreSQL, quoted identifiers can contain any character, except the
character with code zero. For example:
postgres=# CREATE table "<>!(at)#$%^&*()" ("*&-=+" int, "?>.,\/" text);
CREATE TABLE
postgres=# \d "<>!(at)#$%^&*()"
Table "public.<>!(at)#$%^&*()"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
*&-=+ | integer | | |
?>.,\/ | text | | |
postgres=# INSERT INTO "<>!(at)#$%^&*()" VALUES (1, 'hello world');
INSERT 0 1
postgres=# SELECT * FROM "<>!(at)#$%^&*()";
*&-=+ | ?>.,\/
-------+-------------
1 | hello world
(1 row)
--
Regrads,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2023-09-27 15:04:55 | BUG #18136: lc_messages is the empty string but should be 'C'? |
Previous Message | 咸🐟 | 2023-09-27 12:35:44 | Re: Bug of psql meta-command \sf & \sv |