Waiting for 8.5 – Application name reporting

On 28th of November Tom Lane committed patch by Dave Page, which adds new capability to system monitoring and logging:

Log Message:
-----------
Add support for an application_name parameter, which is displayed in
pg_stat_activity and recorded in log entries.
 
Dave Page, reviewed by Andres Freund

Continue reading Waiting for 8.5 – Application name reporting

Waiting for 8.5 – better wrapped output in psql

On 22nd of November Tom Lane committed patch by Roger Leigh which fixes my pet peeve:

Log Message:
-----------
Improve psql's tabular display of wrapped-around data by inserting markers
in the formerly-always-blank columns just to left and right of the data.
Different marking is used for a line break caused by a newline in the data
than for a straight wraparound.  A newline break is signaled by a "+" in the
right margin column in ASCII mode, or a carriage return arrow in UNICODE mode.
Wraparound is signaled by a dot in the right margin as well as the following
left margin in ASCII mode, or an ellipsis symbol in the same places in UNICODE
mode.  "\pset linestyle old-ascii" is added to make the previous behavior
available if anyone really wants it.
 
In passing, this commit also cleans up a few regression test files that
had unintended spacing differences from the current actual output.
 
Roger Leigh, reviewed by Gabrielle Roth and other members of PDXPUG.

Continue reading Waiting for 8.5 – better wrapped output in psql

Waiting for 8.5 – conditional triggers

On 20th of November Tom Lane committed patch by Takahiro Itagaki which adds interesting functionality:

ADD a WHEN clause TO CREATE TRIGGER, allowing a BOOLEAN expression TO be
checked TO determine whether the TRIGGER should be fired.
 
FOR BEFORE triggers this IS mostly a matter OF spec compliance; but FOR AFTER
triggers it can provide a noticeable performance improvement, since queuing OF
a DEFERRED TRIGGER event AND re-fetching OF the ROW(s) at END OF statement can
be short-circuited IF the TRIGGER does NOT need TO be fired.
 
Takahiro Itagaki, reviewed BY KaiGai Kohei.

Continue reading Waiting for 8.5 – conditional triggers

Waiting for 8.5 – checking password strength

On 18th of November Tom Lane committed patch by Laurenz Albe which adds very interesting capability:

ADD a hook TO CREATE/ALTER ROLE TO allow an external module TO CHECK the
strength OF DATABASE passwords, AND CREATE a sample implementation OF
such a hook AS a NEW contrib module "passwordcheck".
 
Laurenz Albe, reviewed BY Takahiro Itagaki

Continue reading Waiting for 8.5 – checking password strength

Waiting for 8.5 – PL/pgSQL variable resolution

On 13th of November (I know, backlog again), Tom Lane committed patch which make PostgreSQL more strict about what happens in stored procedures in PL/pgSQL:

ADD control knobs FOR plpgsql's variable resolution behavior, and make the
default be "throw error on conflict", as per discussions.  The GUC variable
is plpgsql.variable_conflict, with values "error", "use_variable",
"use_column".  The behavior can also be specified per-function by inserting
one of
        #variable_conflict error
        #variable_conflict use_variable
        #variable_conflict use_column
at the start of the function body.
 
The 8.5 release notes will need to mention using "use_variable" to retain
backward-compatible behavior, although we should encourage people to migrate
to the much less mistake-prone "error" setting.
 
Update the plpgsql documentation to match this and other recent changes.

Continue reading Waiting for 8.5 – PL/pgSQL variable resolution

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