Re: MDB postgresql feature request

From: Date: Mon, 18 Aug 2003 09:10:06 +0000
Subject: Re: MDB postgresql feature request
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19961@lists.php.net to get a copy of this message
Alexey Borzov wrote:
Hi! Jeroen Houben wrote:
Hi, Postgresql 7.2 and above do not automatically truncate strings if they don't fit the field. Although this complies with the SQL specs, I think a lot of people find it annoying. It would be nice if you could set an option (auto_truncate_strings) to "on" or "off".
I am strongly against seeing this option in MDB. PostgreSQL (as a proper RDBMS) tries to make sure that data that gets stored in the DB is valid, thus erroring out when the data you try to insert is invalid. BTW, I am also against 'fixing' its date type so it will accept '2003-02-31' as a valid date or adding an 'INSERT IGNORE' (mis)feature. I suggest fixing your application, that was the way I went when 7.2 came out and I found this problem. Besides, *you* certainly know the length of your fields, MDB may not without quering the system tables, which will lead to additional and completely unnecessary overhead.
Hi Alexey, Okay, perhaps the overhead is too big and in that case I agree it would be unwise to add this feature. Too bad there's no switch in postgresql you can set to make it behave like < 7.2 versions.. Jeroen

« previous php.pear.dev (#19961) next »