For the record, I'm in favour of the DBI and drivers not 'messing'
with the data in any way (by default).

>From (distant) memory the old change to DBD::Oracle was motivated by a
desire to allow embedded nul bytes to be saved and restored. I think the
trimming of trailing blanks was seen as a lesser evil.

Compare the "Input" subsections of the VARCHAR2, STRING, and CHAR
external types as documented here:
http://www.cs.umbc.edu/help/oracle8/server.815/a67846/datatype.htm#421810

I intend to at least name it easy to set the default bind type at
the $dbh level but I may also change the default bind type back to
the STRING type. In which case trailing spaces won't be deleted but
you won't be able to embed nul bytes (by default, you can always
change the default bind type).

Tim.

On Thu, Feb 28, 2002 at 04:13:42PM -0500, Jeff Hunter wrote:
> I agree, it should be fixed.
> 
> Peter J. Holzer wrote:
> 
> >I don't think the current behaviour[1] is correct. In perl, strings can
> >have trailing spaces: "test" and "test " compare as not equal.
> >In Oracle varchar2 can store strailing spaces: If I store 'test ' in a
> >varchar2 column, I get back 'test ' and not 'test' or 'test        '.
> >
> >Therefore I can expect that when I use perl DBI to store "test ", I
> >can also read back "test " and not "test". But it ain't so, and it
> >should be fixed.
> >
> 

Reply via email to