db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1490) Provide ALTER TABLE RENAME COLUMN functionality
Date Sun, 15 Oct 2006 18:51:41 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1490?page=all ]

Bryan Pendleton updated DERBY-1490:
-----------------------------------

    Attachment: derby1490_v1_needMoreTests.diff

Thanks Edson and Wolf for the suggestions on possible syntax. I see that
Postgres and Oracle appear to implement ALTER TABLE t RENAME COLUMN c TO new_c
while DB2 appears to implement RENAME COLUMN t.c to new_c

I think that in the future it would be possible to support multiple syntax variants. For
now I have concentrated just on implementing the ALTER TABLE syntax as it is
the least amount of work.

Attached is a not-ready-for-commit patch proposal 'derby1490_v1_needMoretests.diff'.
This patch modifies the parser to support the new syntax
   ALTER TABLE t RENAME COLUMN c TO new_c
and
  ALTER TABLE t RENAME TABLE t TO new_t

The patch also contains a handful of tests, to demonstrate the most rudimentary
aspects of the new command.

I intend to write additional tests later and propose a replacement patch, but I would
like to hear any feedback on this patch, too!


> Provide ALTER TABLE RENAME COLUMN functionality
> -----------------------------------------------
>
>                 Key: DERBY-1490
>                 URL: http://issues.apache.org/jira/browse/DERBY-1490
>             Project: Derby
>          Issue Type: New Feature
>          Components: Documentation, SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.2.1.6, 10.1.2.1, 10.1.3.1
>            Reporter: Bryan Pendleton
>         Assigned To: Bryan Pendleton
>         Attachments: derby1490_v1_needMoreTests.diff
>
>
> Provide a way to rename a column in an existing table. Possible syntax could be:
>   ALTER TABLE tablename RENAME COLUMN oldcolumn TO newcolumn;
> Feature should properly handle the possibility that the column is currently used in constraints,
views, indexes, triggers, etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message