On 2/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Dennis Cote <[EMAIL PROTECTED]> wrote:
>
> The problem is that you can't use a function like strftime as the
> default value for a column when you create a tbale. It only accepts
> NULL, a string constant, a number, or one of the magic current_* values.
>
Sure you can. You just have to put the expression in parentheses
(to avoid a parsing conflict). Try this:
CREATE TABLE test1(
date TEXT DEFAULT (strftime('%Y-%m-%d %H:%M:%f', 'now')),
dummy int
);
INSERT INTO test1(dummy) VALUES(1);
SELECT * FROM test1;
..
I need to start a wiki page on proposed minor incompatibilities
so that we I go from 3.3.x to 3.4.0 I can be sure to get them all.
What was that one we discussed on this mailing earlier this week?
is it possible to add usage such as the above, and many, many
wonderful SQL suggestions routinely provided by Igor Tandetnik (thanks
Igor!) to the syntax docs in the form of user-submitted comments?
--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
---------------------------------------------------------------------
collaborate, communicate, compete
=====================================================================
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------