Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-30 Thread Keith Medcalf
On Wednesday, 30 October, 2019 06:41, Dominique Devienne wrote: >On Wed, Oct 30, 2019 at 11:26 AM Richard Hipp wrote: >> On 10/29/19, Keith Medcalf wrote: >> > Before you change anything, I think that is incorrect for the various >> > datetime functions. I think they SHOULD be permitted

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-30 Thread Dominique Devienne
On Wed, Oct 30, 2019 at 11:26 AM Richard Hipp wrote: > On 10/29/19, Keith Medcalf wrote: > > > > Before you change anything, I think that is incorrect for the various > > datetime functions. I think they SHOULD be permitted in CHECK > constraints > > and in generated always columns, whether

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-30 Thread Dominique Devienne
On Wed, Oct 30, 2019 at 11:26 AM Richard Hipp wrote: > On 10/29/19, Keith Medcalf wrote: > > > > Before you change anything, I think that is incorrect for the various > > datetime functions. I think they SHOULD be permitted in CHECK > constraints > > and in generated always columns, whether

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-30 Thread Richard Hipp
On 10/29/19, Keith Medcalf wrote: > > Before you change anything, I think that is incorrect for the various > datetime functions. I think they SHOULD be permitted in CHECK constraints > and in generated always columns, whether those are stored or virtual, > whether or not parameters are given

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-30 Thread x
. From: sqlite-users on behalf of Dominique Devienne Sent: Wednesday, October 30, 2019 9:21:12 AM To: SQLite mailing list Subject: Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ? On Wed, Oct 30, 2019 at 8:32 AM Keith Medcalf wrote

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-30 Thread Dominique Devienne
On Wed, Oct 30, 2019 at 8:32 AM Keith Medcalf wrote: > On Tuesday, 29 October, 2019 23:05, Simon Slavin > wrote: > >On 30 Oct 2019, at 3:58am, Keith Medcalf wrote: > > >> Before you change anything, I think that is incorrect for the various > >> datetime functions. I think they SHOULD be

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-30 Thread Keith Medcalf
On Tuesday, 29 October, 2019 23:05, Simon Slavin wrote: >On 30 Oct 2019, at 3:58am, Keith Medcalf wrote: >> Before you change anything, I think that is incorrect for the various >> datetime functions. I think they SHOULD be permitted in CHECK >> constraints and in generated always columns,

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-29 Thread Simon Slavin
On 30 Oct 2019, at 3:58am, Keith Medcalf wrote: > Before you change anything, I think that is incorrect for the various > datetime functions. I think they SHOULD be permitted in CHECK constraints > and in generated always columns, whether those are stored or virtual, whether > or not

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-29 Thread Keith Medcalf
-- >From: sqlite-users On >Behalf Of Richard Hipp >Sent: Tuesday, 29 October, 2019 19:48 >To: SQLite mailing list >Subject: Re: [sqlite] Minor Change Request: CURRENT_* functions also have >SQLITE_FUNC_CONSTANT ? > >On 10/29/19, Keith Medcalf wrote: >> Can the >

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-29 Thread Richard Hipp
On 10/29/19, Richard Hipp wrote: > > Or, at least it is suppose to. I just tried it and that mechanism is > not working correctly for generated columns, which is a bug. > Ticket: https://www.sqlite.org/src/tktview/830277d9db6c3ba10df1c79c6c2be58323553240 -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-29 Thread Richard Hipp
On 10/29/19, Keith Medcalf wrote: > Can the > SQLITE_FUNC_CONSTANT attribute be added to the CURRENT_* functions since the > value is constant during the running of a single statement? No. The functions used in generated tables must be pure. They must always give the same output given the same

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-29 Thread Richard Hipp
On 10/29/19, Keith Medcalf wrote: >>sqlite3 > SQLite version 3.31.0 2019-10-29 16:18:45 > Enter ".help" for usage hints. > Connected to a transient in-memory database. > Use ".open FILENAME" to reopen on a persistent database. > sqlite> create table x(data, createdon default (current_timestamp),