[Typo3-dev] Porting to PostgreSQL (WAS: How to integrate non-MySQL ... )
Martin T. Kutschker
Martin.T.Kutschker at blackbox.net
Fri Mar 26 17:50:27 CET 2004
Frank Joerdens wrote:
>
> - Question: The field 'IP' in table sys_log was varchar(15) and I
> changed it to text. A nifty thing about PostgreSQL ist that it supports
> types such as IP address, which allows e.g. proper sorting on IP
> addresses, and enforces IP addresses, i.e. you couldn't insert anything
> that wouldn't look like an IP address. Is this functionality generally
> wasted when using database abstraction since you always need to go for
> the lowest common denominator? An argument against DBAL ... ;)
That's one of the problems of a DBAL. There is a set of standard SQL
datatypes which many database systems implement (but sometimes with a
different name). Many database systems have proprietary extensions (eg
Mysql has unisgned integers and others). For the DBAL layer you will
have to create a set of datatype requirements. *)
An even bigger problem are different functions supported. Again a set of
"allowed" functions should be made. **)
And of course there are always slightly different SQL syntaxes,
sometimes extensions of the standard, some histoic incompatibilites. ***)
Maintenance commands are mostly incompatible at all or have all kinds of
bells and whistles to make use of database specifica.
But I reckon everybody here knew about that before. Just felt like
summing it up a bit. Yet I think DBAL is a good thing for Typo3. The
core wasn't using fancy Mysql features anyway.
Masi
*)
For the mentioned unsigned integers it'd be possible to use unsigned
integers for Mysql but "normal" integers with a constraint for other
databases.
**)
Some mysql specific functions might be implemented easily in stored
procedures on other database systems. Since the point is to support
enterprise class db systems, the requirement of stored procedures is
IMHO not a problem.
***)
I won't dig into the fact that Mysql lacked transactions, nested queires
and other stuff for a very long time. So using them in Typo3 is
currently not a choice.
More information about the TYPO3-dev
mailing list