db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-268) Add Support for truncate table
Date Thu, 30 Sep 2010 19:53:34 GMT

    [ https://issues.apache.org/jira/browse/DERBY-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916628#action_12916628

Rick Hillegas commented on DERBY-268:

Dag raised the following issue: The 2008 SQL Standard (part 2, section 14.10 <truncate
table statement>, General Rule 7) says that if the table was empty to begin with, then
TRUNCATE TABLE should raise a "no data" completion condition. Note that the Standard says
that the same completion condition should be raised by INSERT statements which end up inserting
no rows: see section 14.11 <insert statement>, General Rule 9.

Completion conditions are represented as SQLStates. I do not see where these completion conditions
are modelled in JDBC. In any event, Derby does not do anything special for empty INSERTs.
I see no reason to introduce special machinery to model this clause of the TRUNCATE standard.
We can revisit this topic if we decide to build completion conditions for INSERT statements.

> Add Support for truncate table
> ------------------------------
>                 Key: DERBY-268
>                 URL: https://issues.apache.org/jira/browse/DERBY-268
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Lance Andersen
>            Assignee: Eranda Sooriyabandara
>            Priority: Minor
>         Attachments: derby-268-01-ab-enableForInsaneBuilds.diff, derby-268-02-aa-permsTest.diff,
derby-268-03-aa-npe.diff, Derby-268.diff, tests.diff, TruncateConcurrency.java, TruncateConcurrency.java,
> Adding support for truncate table command will aid to portability

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message