Earlier quoted context omitted.
One of the authors of DuckDB here: we use the PostgreSQL parser, and try to be generally compatible with the syntax used by SQLite, Postgres and MySQL. In some cases those are unfortunately mutually exclusive (e.g. null ordering - we have a PRAGMA to change this system-wide). Making the SQL dialect “as compatible as possible” with these systems is very much one of our goals, and if you find any incompatibilities feel…
I'd note that when moving from pg to $other the thing that really trips me up isn't the syntax changes, it's the lack of ARRAY and ROWTYPE. I'm not sure whether those are in scope for you but it'd be nice if the docs said "to be implemented" or "out of scope" somewhere ... and my apologies in advance if they do and I somehow missed it.
DuckDB – An embeddable SQL database like SQLite, but supports Postgres features
131–140 of 167 posts
Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features
#132Earlier quoted context omitted.
One of the authors here - portability of the storage is indeed one of our goals. We test that the same file can be loaded everywhere on different systems, including between ARM and x86. I should mention the storage is still very much a work-in-progress. We are actively working on redesigning the storage to add compression and other extra features, meaning the storage format can change and be incompatible between diff…
Do you consider (or maybe you already have) the advanced columnar features? Run length encoding, dictionary encoding, etc. It would be great to see how those perform under these workloads.
Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features
#133Earlier quoted context omitted.
What? SQLite3 absolutely has FKs.
You just have to write PRAGMA foreign_keys = on; each and every single time you want to do an operation that requires an FK constraint, like `INSERT`.
ftfy.
You really shouldn't be needing to create new connections often. Really only once for any given process.
There are some 20 PRAGMAs that PhotoStructure sets for library databases, but it's only at process startup, and it takes a couple millis to run them all. It's wonderful to be able to configure stuff so easily.
I also think the design decision for backward comparability (which meant this default is false) is absolutely defensible.
Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features
#134Earlier quoted context omitted.
One of the authors here - portability of the storage is indeed one of our goals. We test that the same file can be loaded everywhere on different systems, including between ARM and x86. I should mention the storage is still very much a work-in-progress. We are actively working on redesigning the storage to add compression and other extra features, meaning the storage format can change and be incompatible between diff…
DuckDB looks very interesting and I'm quite excited to examine it more closely in the next few days! I just wanted to add to the discussion that an unchanging file format, or at least a backwards compatible one, is a key feature of sqlite. See for example Richard Hipp's comments here [1] (I think he also mentioned earlier in the talk that the file format has become a limiting factor now in terms of some of the refact…
We already support reading from the arrow in-memory format [1], therefore it is already possible to use DuckDB to perform SQL-on-Arrow. More support there is definitely possible, and I think this is a very promising direction.
Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features
#135Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features
#136I was hoping from the title that it aims for postgres SQL compatibility, but I can't find it explicitly mentioned in the docs. This really makes me think I really want something like sqlite://memory which completely disregards speed or even persistence. Instead you could say for example "open an in-memory database that behaves like postgres 9" and run your tests against it. With typical fixtures of 10 or so rows, you…
What you want is having a Postgres server, but optimized for tests. What I've done is 1. One instance per pipeline 2. Parallelize by having separate databases per process 3. Build schema once 4. Before each test, purge the database (or run tests in transactions so you can just rollback in the end) 5. Run in Docker, use tmpfs volumes for writes (no disk writes)
It runs fairly quickly.
Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features
#137Earlier quoted context omitted.
If everything you said is accurate, somebody should make another pitch for WebSQL ( https://en.wikipedia.org/wiki/Web_SQL_Database ) with a custom version of DuckDb! Every browser maker was interested in implementing it but the W3C couldn't go ahead with it because everyone chose to implement it using SQLite, where as W3C required more than one db back-end implementation to move forward.
Having sqlite included in all browsers with standard bindings would have been great.
Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features
#138Earlier quoted context omitted.
Having sqlite included in all browsers with standard bindings would have been great.
It would! But it would also be a security nightmare. Exploit SQLite and you could use it in Safari, Chrome and Firefox - everybody could be affected.
Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features
#139Earlier quoted context omitted.
Do you consider (or maybe you already have) the advanced columnar features? Run length encoding, dictionary encoding, etc. It would be great to see how those perform under these workloads.
Definitely. We have quite detailed plans for compression :) more to follow when we get to it.
Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features
#140Earlier quoted context omitted.
It would! But it would also be a security nightmare. Exploit SQLite and you could use it in Safari, Chrome and Firefox - everybody could be affected.
How would that be different from someone editing something in window.localStorage?