PostgreSQL => ALTER TABLE without timezone -> with timezone, using select for TZ
问题 I'm trying to convert the column, and preserve the data in the specified timezone. I have a script, but it errors out on the SELECT at the end. ALTER TABLE schema.table ALTER COLUMN column_date TYPE TIMESTAMP WITH TIME ZONE USING column_date AT TIME ZONE (SELECT value FROM schema.table WHERE id = 'timezone'); ERROR: cannot use subquery in transform expression I have time zones stored, but trying to pull that back to apply to the script is posing a challenge. I know I can simply hardcode the