Re: how to set a DEFAULT value !!
- From: greg@xxxxxxxxxxxx (Greg Sabino Mullane)
- Date: Thu, 27 Apr 2006 03:45:22 -0000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
DBI is complex enough, and AIUI the DBI philosophy opposes adding features
to the core that will cause implementation headaches for driver authors.
The standard perl idiom for default values is
You misunderstand. The DEFAULT is on the database side, not the client, and
is represented by sending the literal string 'DEFAULT' to the backend,
similar to the way that null values are sent by the literal string 'NULL'.
The database then populates the column with whatever the default has been
set as, which may be a constant, or may be (in PostgreSQL's case) an arbitrarily
complex expression or call to a stored procedure.
- --
Greg Sabino Mullane greg@xxxxxxxxxxxx
PGP Key: 0x14964AC8 200604262344
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFEUD4jvJuQZxSWSsgRAjUPAJ9X8mTMNT2cPZYCPHVFVuBr2ydccQCdFFma
BbE1KNnv1ofBwOkd8UhOFM8=
=j+L7
-----END PGP SIGNATURE-----
.
- Follow-Ups:
- Re: how to set a DEFAULT value !!
- From: Jonathan Leffler
- Re: how to set a DEFAULT value !!
- From: Ron Savage
- Re: how to set a DEFAULT value !!
- References:
- Re: how to set a DEFAULT value !!
- From: David Nicol
- Re: how to set a DEFAULT value !!
- Prev by Date: Re: last insert id
- Next by Date: DBD::Oracle ppd
- Previous by thread: Re: how to set a DEFAULT value !!
- Next by thread: Re: how to set a DEFAULT value !!
- Index(es):
Relevant Pages
|