Greg Sabino Mullane wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message


Which database server is this?

This is definitely the behavior of MySQL, PostgreSQL, and Oracle,
and I'm pretty sure most others follow it as well.

Whoa. Be careful what you say about Oracle.

Oracle does have default values for table columns, defined
by the DEFAULT clause in CREATE/ALTER TABLE.

However, the _only_ way to get a column set to the default value
is to leave the column out of the INSERT statement altogether.
There is nothing you can put in a VALUES(..) list which
will do the trick, nor is there anything that can be bound to
a placeholder which will result in the default being set.

DBD::Oracle cannot be enhanced to provide a facility
to get a placeholder replaced by the default value for
a column, since the OCI API does not support it.

This seems to me to be a sufficient reason not to attempt
to extend the DBI to provide this facility. Perhaps it would
be better if the authors of DBDs which can support it could
be persuaded to do it using a special bind value, as DBD:Pg
apparently does does.

--
Charles Jardine - Computing Service, University of Cambridge
[EMAIL PROTECTED]    Tel: +44 1223 334506, Fax: +44 1223 334679

Reply via email to