Re: [PATCH] Make "psql -1 < file.sql" work as with "-f" - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [PATCH] Make "psql -1 < file.sql" work as with "-f"
Date
Msg-id alpine.DEB.2.02.1305101828140.1923@localhost6.localdomain6
Whole thread Raw
In response to Re: [PATCH] Make "psql -1 < file.sql" work as with "-f"  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
> My first use of 9.3beta1 in development failed because of changes
> introduced by this patch, specifically because of the newly introduced error
>
>    psql: -1 is incompatible with -c and -l
>
> I'm not convinced this is correct.  -c and -l are single-transaction
> actions almost by definition.
>
> This particular aspect of the change wasn't really brought up in the
> original thread.  What was your thinking?

AFAICR, the 3 lines patch I submitted did not include such a check.

Comments by Robert in the source suggest that the -1 option is ignored 
under -c and -l. This is because the "transaction" is handled by 
process_file which is not called in these cases.

However, if they are single transaction nevertheless, the guard may just 
be removed, even if the option does nothing?

ISTM that option -l is readonly, it does not matter much. For -c, I'm not 
that sure.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: "Evan D. Hoffman"
Date:
Subject: Re: Re: [GENERAL] pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4
Next
From: Tom Lane
Date:
Subject: Re: pgcrypto: Fix RSA password-protected keys