News for hackers. Stuff that matters.
Re:PostgreSQL 9.3 Beta 1 Released by zapov on Monday May 13, 2013 @10:09AM (#5698708)
Postgres type system is so much better than any other RDBMS that it's a shame NoSQL guys didn't spend more time building on top of it. While their optimizer could use some work here and there it's improving all the time.

We are doing some pretty obscure stuff to it and it's serving us well. Oracle on the other hand requires so much attention and special handling with it's type system, that if there were an alternative, I wouldn't even bother with it.

Re:PostgreSQL 9.3 Beta 1 Released by alberth on Monday May 13, 2013 @10:17AM (#5698760)
HStore [1] is NoSQL plugin for Postgres. Works great. Been available for a long time too.

[1] http://www.postgresql.org/docs/9.0/static/hstore.html

Re:PostgreSQL 9.3 Beta 1 Released by tiwazz on Monday May 13, 2013 @10:44AM (#5698926)
I don't believe hstore supports nested structures, which would make it less than a drop in replacement for many NoSQL use cases. Native JSON support should fix that though, so good news everyone!

http://www.postgresql.org/docs/devel/static/functions-json.h...

Re:PostgreSQL 9.3 Beta 1 Released by zapov on Monday May 13, 2013 @10:53AM (#5698980)
Postgres supports native nested structures. Well, as long as your structures are not circular. JSON everywhere is really a bad choice for most data structures. It's like having no structure at all.
Re:PostgreSQL 9.3 Beta 1 Released by masklinn on Monday May 13, 2013 @10:58AM (#5699012)
Which is pretty much what you want to build a schemaless nosql-on-postgres.

Also, Posgres already has hstore (already mentioned) and XML columns, which are schemaless and "unstructured".

Re:PostgreSQL 9.3 Beta 1 Released by zapov on Monday May 13, 2013 @11:14AM (#5699098)
Well, I'm arguing that flexible schema is better than no schema. And in practice schemaless is only about schema defined outside of database. It's a solution to the wrong problem.
Re:PostgreSQL 9.3 Beta 1 Released by netghost on Monday May 13, 2013 @11:55AM (#5699384)
hstore is just based on a text format, so if it doesn't support it normally, you could just cast the results of each query to a new hstore, something like `select (data -> foo)::hstore -> bar`.

It's probably not a good idea though ;) You don't get any benefit of indices in that case, and I'm not sure what would happen with nulls.

Re:PostgreSQL 9.3 Beta 1 Released by gbog on Monday May 13, 2013 @10:15AM (#5698751)
It seems you could easily get a nosql postgres if you limit yourself to one table with two columns (id, json). Snark apart, it would work quite ok, no?
Re:PostgreSQL 9.3 Beta 1 Released by recuter on Monday May 13, 2013 @10:42AM (#5698908)
Sort of like a column store? ;) This is also rather how Reddit uses it I believe.
Re:PostgreSQL 9.3 Beta 1 Released by masklinn on Monday May 13, 2013 @10:31AM (#5698835)
the json support is fairly recent and doesn't support operating directly on the data yet (e.g. you have to create functional indexes through plv8js and you can't directly query on the document's content as you can with array, xml or hstore columns)
Re:PostgreSQL 9.3 Beta 1 Released by e1ven on Monday May 13, 2013 @11:19AM (#5699137)
I'm using https://github.com/JerrySievert/mongolike to support Postgres using mongo-like queries.

I patched in a bunch of features I needed, and it works really well for me.

Re:PostgreSQL 9.3 Beta 1 Released by jeltz on Monday May 13, 2013 @10:45AM (#5698935)
PostgreSQL 9.3 adds functions for accessing JSON data without having to use plv8js.
Re:PostgreSQL 9.3 Beta 1 Released by masklinn on Monday May 13, 2013 @10:57AM (#5699000)
Yeah but since it's just being added, it precludes "NoSQL guys" having built upon it, which is the original complaint.
Re:PostgreSQL 9.3 Beta 1 Released by jeffdavis on Monday May 13, 2013 @12:39PM (#5699673)
Another intepretation of zapov's comment is that it's a shame the NoSQL projects didn't try achieving their goals by building postgres extensions (or even adding new features).

A reasonable question. MongoDB could have focused their energies on really good JSON support in postgres and making postgres sharding easier.

Re:PostgreSQL 9.3 Beta 1 Released by masklinn on Monday May 13, 2013 @03:18PM (#5700802)
An interesting interpretation, which I had not considered. Thank you.
Re:PostgreSQL 9.3 Beta 1 Released by snaky on Monday May 13, 2013 @11:01AM (#5699023)
If there would be HandlerSocket or similar, yes.
Re:PostgreSQL 9.3 Beta 1 Released by karavelov on Monday May 13, 2013 @11:20AM (#5699146)
Postgresql has prepared queries - they give you the same type of optimization (skip the query parsing on each execution) with more flexibility and with SQL standard syntax.
Re:PostgreSQL 9.3 Beta 1 Released by snaky on Monday May 13, 2013 @12:02PM (#5699440)
Prepared statements are far away from speedup you may get with handlersocket, even with https://github.com/dimitri/preprepare
Re:PostgreSQL 9.3 Beta 1 Released by lucian1900 on Monday May 13, 2013 @10:42AM (#5698911)
You'd be better of with hstore than json.
Re:PostgreSQL 9.3 Beta 1 Released by snaky on Monday May 13, 2013 @11:06AM (#5699056)
But now we can have both - PostgreSQL with all the batteries + (as just one of that batteries) any additional NoSQL backend using http://blog.endpoint.com/2013/05/foreign-data-wrappers.html