On Sunday, January 7, 2024, jian he <jian.universal...@gmail.com> wrote:
> hi. > Maybe this is a small printout err_position bug. > > create table atacc2 ( test int, a int, b int) ; > success tests: > alter table atacc2 add CONSTRAINT x PRIMARY KEY (id, b ); > alter table atacc2 add CONSTRAINT x PRIMARY KEY (id, b a); > alter table atacc2 add CONSTRAINT x PRIMARY KEYa (id, b); > > tests have problem: > alter table atacc2 add constraints x unique (test, a, b); > ERROR: syntax error at or near "(" > LINE 1: alter table atacc2 add constraints x unique (test, a, b); > > ^ > ADD either following with the optional keyword "COLUMN" or > "CONSTRAINT" as the doc. > so I should expect the '^' point at "constraints"? > It’s finding “… add column_name data_type column_constraint” then dies at the parenthesis. So indeed the care t should be pointing where it probably is, at the parenthesis that the error is referring to. David J.