Subject Re: [firebird-support] Re: Bug in create table?
Author Fidel Viegas
On Wed, Mar 11, 2009 at 4:10 PM, maverickthunder
<maverickthunder@...> wrote:
>> Scripts are just batches of statements. If you are using a third-party
>> tool that has a scripting interface, make sure you are able to control what
>> happens to later statements if exceptions occur in earlier ones. A bad line
>> in a script doesn't stop the script from continuing to execute! The Firebird
>> engine itself doesn't know it is executing a script. ;-)
>
> The point is that CREATE TABLE should fail always if the table have 2 rows
> with the same name.
>
> The table was like this:
>
> (some fields)
> "Observaciones" BLOB SUB_TYPE TEXT SEGMENT SIZE 4096,
> (some other fields)
> "Observaciones" BLOB SUB_TYPE TEXT SEGMENT SIZE 8192
> (end of definition)
>
> Both fields inside quotes. I tested again:
>
> CREATE TABLE "Demo" (
> "Codigo" INTEGER NOT NULL,
> "Observaciones" BLOB SUB_TYPE TEXT SEGMENT SIZE 8192,
> "Nombre" VARCHAR(50) NOT NULL COLLATE PXW_SPAN,
> "Observaciones" BLOB SUB_TYPE TEXT SEGMENT SIZE 4096
> );
>
> You will have only one field named Observaciones... then try this:
>
> ALTER TABLE "Demo"
> DROP "Observaciones";
>
> You will get an error.

You cannot change an uncommited table. For your test to work, you need
to create the table, commit it, and then you can alter it.

Fidel.