Re: how to set a DEFAULT value !!




-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


DBD::Oracle does not implement placeholder binding by
re-writing statements itself. Instead it uses Oracle's
internal implementation of placeholders.

Yes, unfortunately PostgreSQL does not support the use of DEFAULT
inside of its server-side prepared statements either. However,
someday it will, and DBD::Pg will be ready! :)

Currently, if any of the values (e.g. the xeecute() array) is a DEFAULT
value, DBD::Pg switches transparently back to the old style of prepared
statements by doing the placeholder substituting itself, and then sending
the computed string to the backend to be executed. So, we potentially lose
a tiny bit of speed but allow people to not have to create a separate
statement handle (which they can still do of course, if performance becomes
that much of an issue).

So - my point remains. DBD::Oracle, as designed, cannot
implement the suggested feature.

Well, I don't think it will actually involve any shared DBI logic
code, but I would like to see a common syntax used, e.g. something like
$DBI_DEFAULT. Drivers would be free to have their dbdimp.c take
advantage of it or not.

- --
Greg Sabino Mullane greg@xxxxxxxxxxxx
PGP Key: 0x14964AC8 200604281323
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFEUk/NvJuQZxSWSsgRAj24AKD0R8hOCKQd4wb8vV0XUr3Wr4+xjQCcCdUj
smeCkeJKYWHdDOoVncib6mU=
=wIpH
-----END PGP SIGNATURE-----


.



Relevant Pages

  • RE: :Sybase success, build errors
    ... Looks like last year I threatened to attempt to patch the tests so they'd run clean under freetds. ... ok 14 # skip freetds doesn't support placeholders ... That diff command came from the perl5-porters FAQ, so I hope its what you want. ...
    (perl.dbi.users)
  • Re: Log DBI query and values with placeholders
    ... Of course execute params are given dynamically and I want to use ... placeholders for more secure code. ... does not support 'SQL' tracing yet. ... You can also log such queries from ...
    (perl.dbi.users)
  • Re: Log DBI query and values with placeholders
    ... Of course execute params are given dynamically and I want to use ... placeholders for more secure code. ... does not support 'SQL' tracing yet. ... You can also log such queries from ...
    (perl.dbi.users)
  • RE: Calling a PostgreSQL function via DBI
    ... I use postgreSQL at home sometimes but not currently at work. ... Calling a PostgreSQL function via DBI ... thing to learn from this thread is to always use placeholders. ... DBI from within your PL/Perl functions. ...
    (perl.dbi.users)
  • Re: insert string problems..
    ... I want to insert some data to postgresql.. ... cursor.executeVALUES ", (yer, id)) ... But in both SQL statements you try to insert table names via placeholders. ... usually sign of a bad schema design BTW. ...
    (comp.lang.python)