Re: [sqlite] readfile() enhancement request

2019-05-17 Thread Tony Papadimitriou
Me neither. Thanks for that tip. It works great for my use case! Thanks to all for their suggestions. I also liked the getclip.bat script. -Original Message- From: Donald Griggs Sent: Friday, May 17, 2019 11:40 PM To: SQLite mailing list Subject: Re: [sqlite] readfile() enhancement r

Re: [sqlite] readfile() enhancement request

2019-05-17 Thread Donald Griggs
Somehow I'd never noticed that. Great feature! On Fri, May 17, 2019 at 2:46 PM David Raymond wrote: > Are you on an OS with a working edit() function? > https://www.sqlite.org/cli.html#the_edit_sql_function > > In Windows using notepad I can do this for example: > > insert into t values ('simp

Re: [sqlite] readfile() enhancement request

2019-05-17 Thread David Raymond
Are you on an OS with a working edit() function? https://www.sqlite.org/cli.html#the_edit_sql_function In Windows using notepad I can do this for example: insert into t values ('simple field', edit('', 'notepad')); You can even use it for multiple fields and it'll open one at a time insert into

Re: [sqlite] readfile() enhancement request

2019-05-17 Thread J Decker
On Fri, May 17, 2019 at 9:34 AM Tony Papadimitriou wrote: > It’s quite often (for me, at least) the case I need to do something like > this from the command line: > > >sqlite3.exe my.db “insert into t values(‘simple field’,’multi-line text > copied from some other app’) > > type con | sqlite3 my.

Re: [sqlite] readfile() enhancement request

2019-05-17 Thread Donald Griggs
Hi Tony, Regarding "The problem is the multi-line text cannot be copy-pasted directly into the command line as the first newline will terminate the command." I don't know what operating system you're using. If it's not a tiny embedded OS, I wondered if you might want to use one of the many sqlit

[sqlite] readfile() enhancement request

2019-05-17 Thread Tony Papadimitriou
It’s quite often (for me, at least) the case I need to do something like this from the command line: >sqlite3.exe my.db “insert into t values(‘simple field’,’multi-line text copied >from some other app’) The problem is the multi-line text cannot be copy-pasted directly into the command line as

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Jose Isaias Cabrera
Jose Isaias Cabrera, on Friday, May 17, 2019 08:28 AM, wrote... >J. King, on Friday, May 17, 2019 07:19 AM, wrote... >>Perhaps I should have been clearer that this is a regression? >> I know, overkill, but here is another look at it, SQLite version 3.28.0 2019-04-16 19:49:53 Enter ".help" for usa

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Clemens Ladisch
Simon Slavin wrote: > On 17 May 2019, at 1:33pm, Clemens Ladisch wrote: >> This keyword behaves magically. ... as far as the SQL standard is concerned. > Mmmm. In that case, to implement this properly you need to store > a default-type flag alongside the default value. The SQLite syntax diagra

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Simon Slavin
On 17 May 2019, at 1:33pm, Clemens Ladisch wrote: > This keyword behaves magically. Mmmm. In that case, to implement this properly you need to store a default-type flag alongside the default value. Proposed values might be 0) No default specified, so use … 1) Fixed default specified, so use

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Clemens Ladisch
Simon Slavin wrote: > If you supply "default CURRENT_TIMESTAMP" I would expect SQLite to > evaluate CURRENT_TIMESTAMP, find a string value like > '2019-05-17 12:10:43', and store that string in the schema. This keyword behaves magically. ANSI SQL-92 says: | The default value inserted in the colum

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Jose Isaias Cabrera
J. King, on Friday, May 17, 2019 07:19 AM, wrote... >Perhaps I should have been clearer that this is a regression? > >SQLite version 3.13.0 2016-05-18 10:57:30 >Enter ".help" for usage hints. >Connected to a transient in-memory database. >Use ".open FILENAME" to reopen on a persistent database. >s

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Nelson, Erik - 2
Please disregard, apologies for the noise. From: "Nelson, Erik - 2" Sent: May 17, 2019 8:17 AM To: sqlite-users@mailinglists.sqlite.org Subject: [External email from sqlite-users-boun...@mailinglists.sqlite.org] Re: [sqlite] Bug in table_info pragma We need to ge

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Nelson, Erik - 2
We need to get these into the hive database, if that's helpful From: Simon Slavin Sent: May 17, 2019 8:16 AM To: SQLite mailing list Subject: Re: [sqlite] Bug in table_info pragma On 17 May 2019, at 12:06pm, J. King wrote: > Then there would be no differentiati

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Simon Slavin
On 17 May 2019, at 12:06pm, J. King wrote: > Then there would be no differentiating "default CURRENT_TIMESTAMP" from > "default 'CURRENT_TIMESTAMP'". That interesting. If you supply "default CURRENT_TIMESTAMP" I would expect SQLite to evaluate CURRENT_TIMESTAMP, find a string value like '2019

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread J. King
On 2019-05-17 07:08:27, "Warren Young" wrote: On May 17, 2019, at 4:55 AM, J. King wrote: SQLite version 3.28.0 2019-04-16 19:49:53 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> create table t

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Warren Young
On May 17, 2019, at 4:55 AM, J. King wrote: > > SQLite version 3.28.0 2019-04-16 19:49:53 > Enter ".help" for usage hints. > Connected to a transient in-memory database. > Use ".open FILENAME" to reopen on a persistent database. > sqlite> create table t(a text default '' /* comment */ ); > sqlite

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread J. King
On 2019-05-17 06:59:58, "Simon Slavin" wrote: On 17 May 2019, at 11:55am, J. King wrote: I would expect it to print only the string delimiters. I might expect it to print only the thing inside the delimiters, i.e. nothing. Then there would be no differentiating "default CURRENT_TIMESTAM

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Simon Slavin
On 17 May 2019, at 11:55am, J. King wrote: > I would expect it to print only the string delimiters. I might expect it to print only the thing inside the delimiters, i.e. nothing. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http:/

[sqlite] Bug in table_info pragma

2019-05-17 Thread J. King
SQLite version 3.28.0 2019-04-16 19:49:53 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> create table t(a text default '' /* comment */ ); sqlite> select dflt_value from pragma_table_info('t') where name