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
If we rename an object or attribute there isn't a way to know that 'foo' becomes 'bar' unless (i) we have a discovery algorithm (that can't be precise -- e.g. rename a table, rename a column and add another column) or (ii) tell explicitly that 'foo' is now 'bar'. AFAICS (ii) is the right way to solve this problem.
OP should explicity inform in configuration file that 'foo' becomes 'bar'. One idea is a 'transform' section that contains option=value pairs. Each pair has option (object or attribute -- goal is identify the object) and a value (indeed two values separated by comma). An example:
[transform]
table=foo, bar ; ALTER TABLE foo RENAME to bar
attribute=teste.a, teste.b ; ALTER TABLE teste RENAME COLUMN a TO b
schema=adm, rh ; ALTER SCHEMA adm RENAME TO rh
table=adm.foo, rh.foo ; ALTER TABLE adm.foo SET SCHEMA TO rh
function=adm.foo(integer), bar ; ALTER FUNCTION adm.foo(integer) RENAME TO bar
schema could be omitted for objects?
disallow different schemas unless in 'schema' option?
double quote if name contains comma
It should support:
RENAME TO / SET SCHEMA
AGGREGATE
COLLATION
CONVERSION
DOMAIN
(FOREIGN) TABLE
FUNCTION
MATERIALIZED VIEW
OPERATOR CLASS
OPERATOR FAMILY
SEQUENCE
ALTER TEXT SEARCH CONFIGURATION
ALTER TEXT SEARCH DICTIONARY
ALTER TEXT SEARCH PARSER
ALTER TEXT SEARCH TEMPLATE
TYPE
VIEW
RENAME
DOMAIN: constraint
EVENT TRIGGER
FOREIGN DATA WRAPPER
INDEX
LANGUAGE
MATERIALIZED VIEW: column
ROLE
RULE
SCHEMA
SERVER
TABLE: column
TABLESPACE
TRIGGER
TYPE: column
MOVE SCHEMA
EXTENSION
OPERATOR
The text was updated successfully, but these errors were encountered:
If we rename an object or attribute there isn't a way to know that 'foo' becomes 'bar' unless (i) we have a discovery algorithm (that can't be precise -- e.g. rename a table, rename a column and add another column) or (ii) tell explicitly that 'foo' is now 'bar'. AFAICS (ii) is the right way to solve this problem.
OP should explicity inform in configuration file that 'foo' becomes 'bar'. One idea is a 'transform' section that contains option=value pairs. Each pair has option (object or attribute -- goal is identify the object) and a value (indeed two values separated by comma). An example:
[transform]
table=foo, bar ; ALTER TABLE foo RENAME to bar
attribute=teste.a, teste.b ; ALTER TABLE teste RENAME COLUMN a TO b
schema=adm, rh ; ALTER SCHEMA adm RENAME TO rh
table=adm.foo, rh.foo ; ALTER TABLE adm.foo SET SCHEMA TO rh
function=adm.foo(integer), bar ; ALTER FUNCTION adm.foo(integer) RENAME TO bar
It should support:
RENAME TO / SET SCHEMA
RENAME
MOVE SCHEMA
The text was updated successfully, but these errors were encountered: