You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding a column default value expression, Doltgres is unable to insert data into a table or add a primary key to the table because it can't analyze the column default value expression correctly.
CREATETABLEpublic."Testing_Table_1" (
"String_Data"text,
id integerNOT NULL
);
CREATESEQUENCEpublic."Testing_Table_1_id_seq"ASinteger
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTERTABLE ONLY public."Testing_Table_1" ALTER COLUMN id SET DEFAULT nextval('public."Testing_Table_1_id_seq"'::regclass);
insert into"Testing_Table_1" ("String_Data") VALUES ('bar');
Doltgres (i.e. GMS) seems to get confused about the value passed into the nextval function. It treats 'public."Testing_Table_1_id_seq"' as a column identify, and then errors out when it doesn't know about a table named "public". GMS should not assume this is a column identity.
We're returning an AliasedExpr where the column default value is aliased as a column identifier, but that doesn't seem correct for a column default value expression.
After adding a column default value expression, Doltgres is unable to insert data into a table or add a primary key to the table because it can't analyze the column default value expression correctly.
Doltgres (i.e. GMS) seems to get confused about the value passed into the
nextval
function. It treats 'public."Testing_Table_1_id_seq"' as a column identify, and then errors out when it doesn't know about a table named "public". GMS should not assume this is a column identity.Here's the stack trace from the error:
Originally reported in #843
The text was updated successfully, but these errors were encountered: