Let's say you're in situation when you have to connect to PostgreSQL, but you have no idea on what password might be set. But some definitely is, as you get this error message:
psql: FATAL: password authentication failed for user "depesz"
Continue reading Recovering from a lost PostgreSQL password.
Jakis czas temu pisalem o mojej przygodzie na Wegrzech i “jazdach" z HDI. Dzis inna historyjka/przypowiesc, nt. firmy “Inter Partner Assistance" i BRE Leasing.
Continue reading depesz kocha ubezpieczycieli
On Thursday, 20th of November, Peter Eisentraut committed his own patch, which adds new command to PostgreSQL: TABLE.
While this command doesn't do anything that wasn't available earlier, it's worth mentioning, as it's one of patches that make PostgreSQL compatible with SQL:2008.
Basically new command “TABLE" acts like an alias to ‘SELECT * FROM':
Continue reading Waiting for 8.4 – TABLE
On 19th of November Tom Lane committed patch by Takahiro Itagaki which does:
Add auto-explain contrib module for automatic logging of the plans of
Continue reading Waiting for 8.4 – auto-explain
Absolutely great post about designing database schema to contain information about marriages and partnerships with emphasis on changes brought to us by modern day – gay marriages, non-trivial sex/gender identities and polygamy.
Finally, we got very important addons to PostgreSQL, which help with dealing with arrays.
It solves a lot of problems, which were usually solved with standard cookbook code, which was in faqs, blog posts and number of examples on irc.
Continue reading Waiting for 8.4 – array aggregate and array unpacker
On 3rd of November Andrew Dunstan committed his patch which adds new function to PostgreSQL – suppress_redundant_updates_trigger().
This function is not for using in selects, but it can help you tremendously if your database access matches certain pattern.
Continue reading Waiting for 8.4 – suppress_redundant_updates_trigger
In PostgreSQL 8.2, we got “RETURNING" clause in INSERT/UPDATE/DELETE queries.
Unfortunately it could not be used as source of rows for anything in sql.
INSERT INTO table_backup DELETE FROM TABLE WHERE ... returning *;
Well, it's still not possible, but it is a one step closer, thanks to patch written and committed by Tom Lane on 31st of October:
Allow SQL-LANGUAGE functions TO RETURN the output OF an INSERT/UPDATE/DELETE
RETURNING clause, NOT just a SELECT AS formerly.
A side effect OF this patch IS that WHEN a set-returning SQL FUNCTION IS used
IN a FROM clause, performance IS improved because the output IS collected INTO
a tuplestore WITHIN the FUNCTION, rather than USING the less efficient
Continue reading Waiting for 8.4 – sql-wrappable RETURNING
On 28th of October Tom Lane committed his patch that changes some internals of functions, but it also adds interesting capability.
Continue reading Waiting for 8.4 – pl/* srf functions in selects