Subject | Re: [firebird-support] Re: Bug in create table? |
---|---|
Author | Fidel Viegas |
Post date | 2009-03-11T15:21:59Z |
On Wed, Mar 11, 2009 at 4:10 PM, maverickthunder
<maverickthunder@...> wrote:
to create the table, commit it, and then you can alter it.
Fidel.
<maverickthunder@...> wrote:
>> Scripts are just batches of statements. If you are using a third-partyYou cannot change an uncommited table. For your test to work, you need
>> 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.
to create the table, commit it, and then you can alter it.
Fidel.