[TYPO3-english] Oracle & Typo3 + TV
Ries van Twisk
typo3 at rvt.dds.nl
Wed Jul 29 17:43:29 CEST 2009
On Jul 29, 2009, at 10:20 AM, David Bruchmann wrote:
> ----- Ursprüngliche Nachricht -----
> Von: Dmitry Dulepov <dmitry.dulepov at gmail.com>
> Gesendet: Mittwoch, 29. Juli 2009 15:54:35
> An: typo3-english at lists.netfielders.de
> CC:
> Betreff: Re: [TYPO3-english] Oracle & Typo3 + TV
>
>> Most likely it is because those versions of TV have a default value
>> for the uid field and that value is set to 0:
>>
>> ===============
>> CREATE TABLE tx_templavoila_datastructure (
>> uid int(11) DEFAULT '0' NOT NULL auto_increment,
>> ===============
>>
>> MySQL ignores it but Oracle may interpret it like "Start
>> autoincrement from zero".
>>
>
> Access (I know: who cares ;-) ) and perhaps postgresql (can't remember
> anymore) don't ignore this. Why is it written when it doesn't make any
> sense?
>
> Best Regards
> David
MySQL doesn't often makes sense because the have there history of
oddities
and they like to be backward compatible...
I cannot speak for Oracle (I think oracle handles auto numbering by
triggers)..
But PostgreSQL is the default value a a function and get's expanded to
something of
I believe once was said that TYPO3 would not supply the default value
anymore for auto increment... I might have been wrong.
FYI : PostgreSQL Example:
CREATE TABLE tablename (
colname SERIAL
);
is equivalent to specifying:
CREATE SEQUENCE tablename_colname_seq;
CREATE TABLE tablename (
colname integer DEFAULT nextval('tablename_colname_seq') NOT NULL
);
So your default is actually calling a function nextval,
kinda cool if you think about it.
because it asllows you to get your next primary key value without
creating an actual record.
If you decide not to use it then you can just trow the value away.
In MySQL you would need to create a record and if you decide not to
use it you need to delete the record.
Ries
regards, Ries van Twisk
-------------------------------------------------------------------------------------------------
tags: Freelance TYPO3 Glassfish JasperReports JasperETL Flex Blaze-DS
WebORB PostgreSQL DB-Architect
email: ries at vantwisk.nl web: http://www.rvantwisk.nl/
skype: callto://r.vantwisk
Phone: +1-810-476-4196 Cell: +593 9901 7694 SIP:
+1-747-690-5133
More information about the TYPO3-english
mailing list