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 would suggest that adding a small amount of code bloat to accept 
> another magic default value that stores the high resolution julian day 
> number

This would break backwards compatibility.  It would not be a major
break but it could possible cause problems for some users.

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?

--
D. Richard Hipp  <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to