Waiting for 9.3 – JSON generation improvements.

On 10th of March, Andrew Dunstan committed patch: JSON generation improvements.   This adds the following:   json_agg(anyrecord) -> json to_json(any) -> json hstore_to_json(hstore) -> json (also used as a cast) hstore_to_json_loose(hstore) -> json   The last provides heuristic treatment of numbers and booleans.   Also, in json generation, if any non-builtin type has a … Continue reading “Waiting for 9.3 – JSON generation improvements.”

What index to create?

Some time ago I wrote a blogpost about why index might not be used. While this post seemed to be well received (top link from depesz.com on reddit), it doesn’t answer another question – what index to create for given situation. I’ll try to cover this question now. IMPORTANT UPDATE: As of PostgreSQL 10 hash … Continue reading “What index to create?”

Waiting for 9.1 – format()

On 21st of November Robert Haas committed new patch, which adds new function: Add new SQL function, format(text). Currently, three conversion format specifiers are supported: %s for a string, %L for an SQL literal, and %I for an SQL identifier. The latter two are deliberately designed not to overlap with what sprintf() already supports, in … Continue reading “Waiting for 9.1 – format()”

zmienna lista “cech” – ciąg dalszy

jakiś czas temu pisałem jak poradzić sobie z przechowywaniem zmiennej listy cech obiektów w bazach relacyjnych. okazuje się, że nie tylko ja zetknąłem się z tym problemem (szokujące, czyż nie?). dwóch, znanych w świecie postgresowym ludzi – teodor sigaev i oleg bartunov – zajęli się tym problemem. jeśli ich nie kojarzycie – to są ludzie … Continue reading “zmienna lista “cech” – ciąg dalszy”