Gmail hid the line you gave (as if it was the same as something I'd sent —
curious behaviour by Gmail):

 INSERT INTO SomeTable(DateTimeCol)
             VALUES(DATETIME(2014-12-31 23\:59\:59) YEAR TO SECOND);

I really won't want people have to futz with their legitimate Informix SQL
in order to pass it through DBD::Informix.  Whatever is provided, whether
by DBI or DBD::Informix, must accept the code without the backslashes in
front of the colons.  It is simply not acceptable to have to modify valid
SQL to get it past the gatekeeper code.

At the moment, the unescaped code works fine.  It will continue to work
fine.  As long as DBI does not break the currently working code, I will
survive — like I have for the last decade and more.  Just make sure that
whatever you do does not break working valid Informix SQL code.


On Sat, Dec 20, 2014 at 2:17 PM, Tim Bunce <tim.bu...@pobox.com> wrote:
>
> On Sat, Dec 20, 2014 at 01:14:29PM -0800, Jonathan Leffler wrote:
> >    Many, many years ago, DBD::Informix had to give up on the
> DBI-provided parsing for placeholders because
> >    there were too many contexts in which it was wrong for Informix.  It
> may have improved since then, but:
> >
> >          INSERT INTO SomeTable(DateTimeCol)
> >            VALUES(DATETIME(2014-12-31 23:59:59) YEAR TO SECOND);
>
> >    I think I raised this as an issue back in the 1996-1998 timeframe (I
> said 'many years ago' and meant
> >    it).  I'd have to dig through my release notes to be more precise.
> Informix only supports natively the
> >    `?` placeholders.  It doesn't yet have the complexities introduced by
> the PostgreSQL operators.
> >
> >    I don't know whether this can be handled at all.  It may be that
> DBD::Informix has to stay out in
> >    isolation but it would be nice if it wasn't necessary.
>
> The `?` placeholders are 'standard' (for some definition) so DBD::Informix
> isn't really 'in isolation'. There are quite a few drivers that only
> support `?` placeholders.
>
> In theory, if this proposal goes ahead, and is applied to `:` placeholders
> as seems likely, then you'd be able to write the above as:
>
>            INSERT INTO SomeTable(DateTimeCol)
>              VALUES(DATETIME(2014-12-31 23\:59\:59) YEAR TO SECOND);
>
> Tim.
>


-- 
Jonathan Leffler <jonathan.leff...@gmail.com>  #include <disclaimer.h>
Guardian of DBD::Informix - v2013.0521 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."

Reply via email to