Re: TODO item: Allow more complex user/database default GUC settings - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: TODO item: Allow more complex user/database default GUC settings
Date
Msg-id 20090930210150.GL8280@alvh.no-ip.org
Whole thread Raw
In response to Re: TODO item: Allow more complex user/database default GUC settings  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane escribió:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > FWIW I came up with a preliminary patch for a new psql command \dus that
> > shows settings.  It takes a pattern that's used to constrain on roles.
> > Thus there is no way to view settings for a database.  If there's a need
> > for that we could use another command, say \dls.
>
> Why not two pattern arguments?
>
>     \drds [ role-pattern [ db-pattern ]]

Hmm, interesting idea, patch attached.  This required changing the API
of processSQLNamePattern to return a bool indicating whether a clause
was added; otherwise, when processing the second pattern it was
impossible to figure out if we needed a WHERE or not.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CommitFest 2009-09, two weeks on
Next
From: Tom Lane
Date:
Subject: Re: latest hstore patch