Hacker Newsnew | past | comments | ask | show | jobs | submit | more SQLite's commentslogin

No. The SQLite Forum is just an instance of Fossil. Fossil is written in C.


RIGHT and FULL JOIN are on the trunk branch of SQLite and will (very likely) appear in the next release. Please grab a copy of the latest pre-release snapshot of SQLite (https://sqlite.org/download.html) and try out the new RIGHT/FULL JOIN support. Report any problems on the forum, or directly to me at drh at sqlite dot org.


This is fantastic news, I'm very glad to hear that this is appearing soon! Thanks!


SWEEEEET!

Finally!

Thank you so much for this Mr. Hipp!

EDIT: Don't forget to edit the `omitted.html` page when you ship it!


You misunderstand. It means that a single application should not use two or more copies of the SQLite library to open the same database file.

As a practical matter, you really have to work hard to get an application to use two different copies of SQLite at the same time - all the while avoiding symbol collisions on link. You can do it, but it takes some work. And then on top of that your application has to decide to open two or more connections to the same database file, using different copies of SQLite in each case.


Yeah, managing to do that is ... almost impressive.

The more common failure mode I've seen is a library bundling and inlining an old version of a database API in a way that means it overrides the shared object I was expecting my code to link to, and alarums and excursions resulting thereby.

(I don't imagine SQLite would -break- in that situation, but I doubt my application code would be any less unhappy than in the cases of that problem I've encountered in the wild)


> You can do it, but it takes some work.

It's easy: create DLL/.so A with statically linked sqlite. create DLL/.so B with statically linked sqlite. Make a program using both DLLs.


I bet this situation is even relatively common amongst users of SQLite from Node, which is notorious for having multiple versions of the same dependency.


Edit history: https://sqlite.org/docsrc/finfo?name=pages/btreemodule.in

That last substantive edit to the document was in 2009. There were some spelling corrections in 2010. We finally got around to removing it from the documentation set in 2016.


Some issues with "Git the standard format":

  *  Does not track cherry-picks

  *  Does not track branch names

  *  Tags must be unique.  (You cannot add a "release" tag to every release,
     for example.)

  *  Not easily extensible - witness the pain and years of effort trying
     to move from SHA1 to SHA2.



> Open Source Definition explicitly excludes [public domain]

Mis-information. The Open Source Definition (https://opensource.org/osd) has no such exclusion. Read it for yourself.


Sorry, I indeed should have said "deliberately" or "intentionally" instead of "explicitly". What I meant was that it's not included, and that not including it was a conscious choice rather than an oversight:

https://opensource.org/node/878 https://opensource.org/faq/#public-domain

My reading is the core problem is that not every jurisdiction recognizes public domain dedications, so for some people, such software may be no different than "all rights reserved".


I like anamexis's explanation better than my own (that I was typing in concurrently). :-) I'm going to upvote his...


Too late, Doctor Hipp. I've already upvoted you all.


No date/time data type will meet everybody's requirements. Some date/time formats will have a limited range, or won't have enough precision, and on the other hand, some date/time type implementations will give lots of range and precision but then end up taking up too much space on disk. It is not possible to please everyone. It seems better to provide basic low-level datatypes (integer, 64-bit IEEE float, string, BLOB) and let the developer choose whatever date/time representation best meets the needs of the application.


It is certainly possible, though, to please most people. The date types in other competing SQL engines are widely used; I don't think you get off the hook by just listing a couple of different requirements that people have and saying that it's hard and throwing up your hands. DATETIMEOFFSET is not possible to reasonably implement in SQLite using any of the built-in types because you need special equality semantics that understand how to convert time zone offsets. You can't just pack it into a string or a number and hope for the best; comparisons between values don't work out. There's no way to pack it into a string format in such a way that a regular string comparison will provide chronological ordering and correct equality semantics.

I have built an entire T-SQL layer on top of SQLite and I had to omit DATETIMEOFFSET support entirely. There's no good way to do it with the tools that SQLite provides. Please let me know if I've missed a way; I would like to add this to my extended SQLite language. DATETIMEOFFSET is the gold standard in the SQL Server world and it is a gaping hole in my compatibility layer.

I have also built a virtual table module that links remote SQL Server tables into SQLite. I had to discard the time zone information for DATETIMEOFFSETs in the remote table and show it in SQLite as a UTC time only in string format. This is strictly worse than what we have in SQL Server, and the gap cannot be crossed with clever application-side code.


By this reasoning why supply integer and 64 bit float since they don't cover all requirements and could instead be encoded in strings or blobs just like dates? Why have strings too, just have a binary type?

A date/time data type is very practical even if it doesn't cover all use cases which is why almost all relational database engines have one or more. I suggest something that supports ISO 8601 encoded efficiently similar to SQL Server datetimeoffset which requires 10 bytes for maximum precision.

JSON is also very annoying for not having a date/time type as well!


Thanks Dr Hipp for your response!

Love all things you make (fossil, lemon, SQLite).

While you’re here, I can’t state how much I’d love to see SQLite to push more into client server use cases (Eg WAL2, BEGIN CONCURRENT, etc) I get it might be cleaner to spin that off into its own separate offering. But having something like bedrock but officially from you would be fantastic.


There are standard ANSI SQL DATE, TIME, TIMESTAMP and INTERVAL data types.

SQLite is not truly standards compliant by missing these truly essential column types which make it deeply inconvenient for use in enterprise apps. And also for apps that need pluggable/switchable backend SQL storages.


I get where you're coming from but a lot of people will be happy with date/time types that are compatible with SQL Server or PostgreSQL.


The ANY datatype in STRICT mode behaves the same as a column with no datatype at all in ordinary SQLite. ANY does not give you any new capabilities.


I see. I like SQLite but the idea that there were people leaving the type information off of their columns entirely to take advantage of this hidden(?) "feature" is something I'll wonder about for a while.


That's how I've always used SQLite, with no column type information, then I use the API to populate the column with type information as well as the value, thus implying the Any type. This is now explicit in strict tables.

As an embedded SQL engine I think this is the most rational way to use it, making it very predictable and very flexible.


Today I decided to take a leaf out of your book and use this feature, it does seem appropriate in this case.

As they say, if you can't beat 'em, join 'em!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: