[sqlite] SQLITE_OPEN_EXCLUSIVE

2015-03-15 Thread Simon Davies
On 15 March 2015 at 12:54, Felipe Gasper wrote: > This seems to support the idea that O_EXCL is SQLITE_OPEN_EXCLUSIVE..? "The SQLITE_OPEN_EXCLUSIVE flag is always used in conjunction with the SQLITE_OPEN_CREATE flag, which are both directly analogous to the O_EXCL and O_CREAT flags of the POSIX

[sqlite] SQLITE_OPEN_EXCLUSIVE

2015-03-15 Thread Simon Slavin
On 15 Mar 2015, at 6:06am, Felipe Gasper wrote: > is this how I can say, ?open a database, but only if it?s a new database?? There is no mode in SQLite which does that. You can tell it to do the opposite (only open an existing file, return an error if no file exists) but not the way you

[sqlite] SQLITE_OPEN_EXCLUSIVE

2015-03-15 Thread Felipe Gasper
"Violent agreement". :-) Sent from my android device. -Original Message- From: Simon Davies <simon.james.dav...@gmail.com> To: General Discussion of SQLite Database Sent: Sun, 15 Mar 2015 9:08 AM Subject: Re: [sqlite] SQLITE_OPEN_EXCLUSIVE On 15 March 2015 at 12:5

[sqlite] SQLITE_OPEN_EXCLUSIVE

2015-03-15 Thread Simon Davies
On 15 March 2015 at 06:06, Felipe Gasper wrote: > Hi all, > > Does the SQLITE_OPEN_EXCLUSIVE flag exist as analogous to O_EXCL in > C open()? i.e., is this how I can say, ?open a database, but only if it?s a > new database?? https://www.sqlite.org/capi3ref.html#sqlite3vfsxopen >

[sqlite] SQLITE_OPEN_EXCLUSIVE

2015-03-15 Thread Felipe Gasper
This seems to support the idea that O_EXCL is SQLITE_OPEN_EXCLUSIVE..? Sent from my android device. -Original Message- From: Simon Davies <simon.james.dav...@gmail.com> To: General Discussion of SQLite Database Sent: Sun, 15 Mar 2015 4:16 AM Subject: Re: [sqlite] SQLITE_OPEN_EXC

[sqlite] SQLITE_OPEN_EXCLUSIVE

2015-03-15 Thread Felipe Gasper
That approach isn't race-safe, though. Why does SQLite not allow open via O_EXCL? -FG Sent from my android device. -Original Message- From: Simon Slavin <slav...@bigfraud.org> To: General Discussion of SQLite Database Sent: Sun, 15 Mar 2015 7:44 AM Subject: Re: [

[sqlite] SQLITE_OPEN_EXCLUSIVE

2015-03-15 Thread Felipe Gasper
Hi all, Does the SQLITE_OPEN_EXCLUSIVE flag exist as analogous to O_EXCL in C open()? i.e., is this how I can say, ?open a database, but only if it?s a new database?? Thank you! -Felipe Gasper Houston, TX