[
https://issues.jboss.org/browse/TEIID-2578?page=com.atlassian.jira.plugin...
]
Ramesh Reddy commented on TEIID-2578:
-------------------------------------
ALTER Support
{code}
ALTER [VIRTUAL | FOREIGN] (VIEW | TABLE) <table-name> [ AS <stmt>] ( ADD |
DROP | ALTER) COLUMN <column-name> OPTIONS(...)
{code}
Some examples:
Foreign Table:
{code}
- Changing the options on the foreign table (same is true for view, replace table with
view)
ALTER TABLE G1 ALTER OPTIONS ( (ADD|SET|DROP) key [value])
- Add a column on foreign table
ALTER TABLE G1 ADD COLUMN <column-name> <type> [<constraints>
<options>]
- drop column on foreign table
ALTER TABLE G1 DROP COLUMN <column-name>
-- alter column on foreign table
ALTER TABLE G1 ALTER COLUMN <column-name> OPTIONS (ADD|SET|DROP key [value])
{code}
View Table: When adding and dropping a column on view, the transformation MUST be changed
to reflect the change and to be valid. I found no examples of this anywhere. I am thinking
based on above
{code}
ALTER VIEW <view-name> AS <stmt> ( ADD | DROP | ALTER) COLUMN
<column-name> ..
{code}
the AS <stmt> is required, but I can not seem to figure out how I can contain the
<stmt> during the parsing. [~shawkins] any suggestions ?
add/remove schema elements
--------------------------
Key: TEIID-2578
URL:
https://issues.jboss.org/browse/TEIID-2578
Project: Teiid
Issue Type: Feature Request
Components: Query Engine
Reporter: Ramesh Reddy
Assignee: Ramesh Reddy
Fix For: 9.1
Schemas are currently static after load. Modifications can only happen with restarts or
new versions. We should allow add/drop at runtime.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)