What is the column name restriction of openGauss database creation table

26 Views Asked by At

Create a table statement as follows:

[omm@tpl-centos7 bin]$ ./gsql -ddev -Uomm -p26000 -f test.sql
gsql:test.sql:7: ERROR: column name “tid” conflicts with a system column name
total time: 0 ms
[omm@tpl-centos7 bin]$ cat test.sql
CREATE TABLE if not exists ax_quarantine_rcpt
(
“tid” varchar2(255) NOT NULL,
rcpt varchar2(255) NOT NULL,
org_id varchar2(60) NOT NULL,
PRIMARY KEY (“tid”,rcpt)
);

error:column name “tid” conflicts with a system column name

Looking at the documentation, it says reserved words must never be used as other identifiers, but tid is also not in the keyword Referring to the Internet with double quotation marks does not work, solve

1

There are 1 best solutions below

0
Sarah On

It may be a version problem. He described that the tid is occupied by the system view field. I can use the latest compiled version. It is recommended to use the latest version. If you cannot compile it yourself, you can use the container version. https://hub.docker.com/repository/docker/enmotech/opengauss