Re: COPY FREEZE has no warning

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Jeff Janes <jeff.janes@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2013-01-26T04:08:56Z
Lists: pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> ! 				ereport(ERROR,
> ! 						(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE,
> ! 						errmsg("cannot perform FREEZE because of previous table activity in the current transaction")));

[ itch... ]  What is "table activity"?  I always thought of tables as
being rather passive objects.  And anyway, isn't this backwards?  What
we're complaining of is *lack* of activity.  I don't see why this isn't
using the same message as the other code path, namely

> + 		ereport(ERROR,
> + 				(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE,
> + 				 errmsg("cannot perform FREEZE because the table was not created or truncated in the current transaction")));

			regards, tom lane