Waiting for 8.5 – TRIGGERS on columns

On 14th of October Tome Lane committed new patch from Itagaki Tahahiro:

Log Message:
-----------
Support SQL-compliant triggers ON COLUMNS, ie fire ONLY IF certain COLUMNS
are named IN the UPDATE's SET list.
 
Note: the schema of pg_trigger has not actually changed; we've just started
TO USE a COLUMN that was there ALL along.  catversion bumped anyway so that
this commit IS included IN the history OF potentially interesting changes
TO system catalog contents.
 
Itagaki Takahiro

Continue reading Waiting for 8.5 – TRIGGERS on columns

Waiting for 8.5 – Named function arguments

Pavel Stehule – hero for everybody writing stored procedures, wrote, and later Tom Lane committed patch which adds named arguments for functions:

Log Message:
-----------
Support use of function argument names to identify which actual arguments
match which function parameters.  The syntax uses AS, for example
funcname(value AS arg1, anothervalue AS arg2)
 
Pavel Stehule

Continue reading Waiting for 8.5 – Named function arguments

Waiting for 8.5 – GUC per user and database

On 7th of October Alvaro Herrera committed his own patch, which adds quite interesting possibilty:

Log Message:
-----------
Make it possibly TO specify GUC params per USER AND per DATABASE.
 
CREATE a NEW catalog pg_db_role_setting WHERE they are now stored, AND better
encapsulate the code that deals WITH settings INTO its realm.  The OLD
datconfig AND rolconfig COLUMNS are removed.
 
psql has gained a \drds command TO display the settings.
 
Backwards compatibility warning: while the backwards-compatible system views
still have the config COLUMNS, they no longer completely represent the
configuration FOR a USER OR DATABASE.
 
Catalog version bumped.

Continue reading Waiting for 8.5 – GUC per user and database

Waiting for 8.5 – “GRANT ALL”

One of the most common (or perhaps even the most common) question people have regarding PostgreSQL, is how to change privileges for all tables.

Usually they want something like MySQL's:

GRANT ... ON DATABASE.* TO ...

Which is interesting as it is actually 2 distinct features in one:

  • grant privileges on all existing tables
  • automatically grant privileges on all tables that will be created in this database in the future

Now, thanks to 2 new patches – we have this possibility in PostgreSQL.

Continue reading Waiting for 8.5 – “GRANT ALL"

Waiting for 8.5 – ‘samehost’ and ‘samenet’ in pg_hba.conf

October, finally. “Only" 1 month of backlog in new features in 8.5, but I'm getting there 🙂

So, on 1st of October Tom Lane committed patch by Stef Walter:

Log Message:
-----------
Support "samehost" and "samenet" specifications in pg_hba.conf,
by enumerating the machine's IP interfaces to look for a match.
 
Stef Walter

For some reason I cannot find it in mailing list archive, but luckily have copy of email (without all headers unfortunately).

Continue reading Waiting for 8.5 – ‘samehost' and ‘samenet' in pg_hba.conf

Waiting for 8.5 – DO

On 22nd of September, Tom Lane committed a patch by Petr Jelinek:

Log Message:
-----------
Implement the DO statement TO support execution OF PL code WITHOUT HAVING
TO CREATE a FUNCTION FOR it.
 
PROCEDURAL languages now have an additional entry point, namely a FUNCTION
TO EXECUTE an inline code block.  This seemed a better design than trying
TO hide the transient-ness OF the code FROM the PL.  AS OF this patch, ONLY
plpgsql has an inline handler, but probably people will soon WRITE handlers
FOR the other standard PLs.
 
IN passing, remove the long-dead LANCOMPILER OPTION OF CREATE LANGUAGE.
 
Petr Jelinek

Continue reading Waiting for 8.5 – DO