[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgsql-hackers
Subject:    Re: [HACKERS] proposal: multiple psql option -c
From:       Michael Paquier <michael.paquier () gmail ! com>
Date:       2015-11-30 14:17:10
Message-ID: CAB7nPqRLYhWMw2w4nw25QZc3Y9fSbUToYfQMCjEFs6=vrVK9wg () mail ! gmail ! com
[Download RAW message or body]

On Thu, Nov 26, 2015 at 4:21 AM, Pavel Stehule wrote:
> Attached patch per Tom Lane proposal.
>
> * multiple -c -f options are supported, the order of options is respected
> * the statements for one -c options are executed in transactions
> * Iacob's doc patch merged

 enum _actions
 {
        ACT_NOTHING = 0,
-       ACT_SINGLE_SLASH,
        ACT_LIST_DB,
-       ACT_SINGLE_QUERY,
-       ACT_FILE
+       ACT_FILE_STDIN
 };

Removing some items from the list of potential actions and creating a
new sublist listing action types is a bit weird. Why not grouping them
together and allow for example -l as well in the list of things that
is considered as a repeatable action? It seems to me that we could
simplify the code this way, and instead of ACT_NOTHING we could check
if the list of actions is empty or not.
-- 
Michael


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic