I wrote:
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
-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
On 4/26/06, Greg Sabino Mullane [EMAIL PROTECTED] wrote:
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
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
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Is it a string that's sent, or the identifier? For NULL, it is either an
identifier (not quoted) or Perl undef that denotes NULL in the DBMS. I'm
not sure how you'd represent DEFAULT in Perl, or as a string rather than an
identifier.
DBI (or
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
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
On 4/24/06, Greg Sabino Mullane [EMAIL PROTECTED] wrote:
I've proposed adding something simlilar to DBI itself, but I don't recall
getting
any feedback on it. Presumably once in place DBIx::Class will someday support
it.
DBI is complex enough, and AIUI the DBI philosophy opposes adding
-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
On Thu, 27 Apr 2006 03:45:22 -, Greg Sabino Mullane wrote:
Hi Greg
You misunderstand. The DEFAULT is on the database side, not the
Just curious.
Which database server is this?
And, can you omit the name of the column you want defaulted, and does this
server then insert the default value?
-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.
And, can you omit the name of the column
On Thu, 27 Apr 2006 04:37:20 -, Greg Sabino Mullane wrote:
Hi Greg
It's late here, so hope that made sense. :)
Yep. It means just that much more I don't know...
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I would like to do in SQL
INSERT table VALUES (DEFAULT, NOW());
...
is there any simple way I can write like this?
I'm not exactly sure how DBI::Class does things, but currently
in plain old DBI your only real option is to create a separate
for example, a table, 2 column
Table
| lang_code | CHAR(2)| default: 'en' |
| time | DATETIME | |
13 matches
Mail list logo