Re: MDB2_Driver_pgsql MDB2_PORTABILITY_RTRIM bug?
| From: | Lukas Smith | Date: | Tue, 18 Jul 2006 13:54:10 +0000 |
| Subject: | Re: MDB2_Driver_pgsql MDB2_PORTABILITY_RTRIM bug? | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24677@lists.php.net to get a copy of this message | ||
alessandro pasotti wrote:
Il 15:36, martedì 18 luglio 2006, Lukas Smith ha scritto:CHARACTER is a variable length type. Therefore it is correct to not trim() the value. The issue I tried to address with this feature was lack of RTRIM in fixed character columns. However I do realize that its impossible to specify if the column is fixed or variable length and therefore someone might expect this portability option to therefore relate to both types. Right now this portability option is only used in the Oracle and Interbase/Firebird driver. If you feel this should be changed open a feature request and I will consider changing this. The proper approach would however be to simply change to a fixed length datatype and then PostgreSQL should do the rtrim itself. regards, Lukasalessandro pasotti wrote:I use this test case: CREATE TABLE ntbl_driver (Have I missed something or should I file a bug report?I assumed that pgsql does this by default for non variable length string columns? Is this not the case?driver_id serial NOT NULL, driver character(50), tstamp timestamp(6) without time zone NOT NULL); then I do INSERT INTO ntbl_driver (driver_id, driver, tstamp) VALUES (7, 'GDAL/PNG ', '2004-04-01 12:00:00'); if I dump a fetched array I get a string 50 chars long with spaces on the right (even if MDB2_PORTABILITY_RTRIM is set).