On Wed, 27 Sep 2023 at 20:35, 咸🐟 <2437705447@qq.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
wayhere.(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 "<>!@#$%^&*()" ("*&-=+" int, "?>.,\/" text);
CREATE TABLE
postgres=# \d "<>!@#$%^&*()"
Table "public.<>!@#$%^&*()"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
*&-=+ | integer | | |
?>.,\/ | text | | |
postgres=# INSERT INTO "<>!@#$%^&*()" VALUES (1, 'hello world');
INSERT 0 1
postgres=# SELECT * FROM "<>!@#$%^&*()";
*&-=+ | ?>.,\/
-------+-------------
1 | hello world
(1 row)
--
Regrads,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.