7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.139 2001/06/08 21:16:48 petere Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.140 2001/07/11 21:53:59 momjian Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -307,6 +307,8 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
307
307
{/* copy from file to database */
308
308
if (rel -> rd_rel -> relkind == RELKIND_SEQUENCE )
309
309
elog (ERROR ,"You cannot change sequence relation %s" ,relname );
310
+ if (rel -> rd_rel -> relkind == RELKIND_VIEW )
311
+ elog (ERROR ,"You cannot copy view %s" ,relname );
310
312
if (pipe )
311
313
{
312
314
if (IsUnderPostmaster )
@@ -330,6 +332,8 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
330
332
}
331
333
else
332
334
{/* copy from database to file */
335
+ if (rel -> rd_rel -> relkind == RELKIND_VIEW )
336
+ elog (ERROR ,"You cannot copy view %s" ,relname );
333
337
if (pipe )
334
338
{
335
339
if (IsUnderPostmaster )