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
I tried writing a transform script with this library for my table as I require it to have a new value.
So i used
sql`ALTER TABLE rewrite ALTER COLUMN token SET DEFAULT ${variable};`;
I tried this query in multiple different ways.
I tried setting the Default directly while ADD COLUMN.
None worked.
The Result was always Postgres Error 42P18 -
Query became ALTER TABLE rewrite ALTER COLUMN token SET DEFAULT $1;
Even though i actually did use the variable without quotes, which usually produce this error.
Also, I did use the same variable in 2 other queries before, which did work as intended.
Not sure why ALTER TABLE does not like the DEFAULT setting here. ?
Why is $1 not transformed to the correct value for the given sql Query above ?
The text was updated successfully, but these errors were encountered:
I tried writing a transform script with this library for my table as I require it to have a new value.
So i used
I tried this query in multiple different ways.
I tried setting the Default directly while ADD COLUMN.
None worked.
The Result was always Postgres Error 42P18 -
Query became
ALTER TABLE rewrite ALTER COLUMN token SET DEFAULT $1;
Even though i actually did use the variable without quotes, which usually produce this error.
Also, I did use the same variable in 2 other queries before, which did work as intended.
Not sure why ALTER TABLE does not like the DEFAULT setting here. ?
Why is $1 not transformed to the correct value for the given sql Query above ?
The text was updated successfully, but these errors were encountered: