From c7eb18fcf4e8d30d9178d0b861338cc18875668e Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Mon, 13 Nov 2000 09:06:36 +0000 Subject: [PATCH] prevent open failure of VIEW --- src/backend/storage/smgr/smgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index 01a7877e80..32712d96fe 100644 --- a/src/backend/storage/smgr/smgr.c +++ b/src/backend/storage/smgr/smgr.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.43 2000/11/08 22:10:00 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.44 2000/11/13 09:06:36 inoue Exp $ * *------------------------------------------------------------------------- */ @@ -262,6 +262,8 @@ smgropen(int16 which, Relation reln, bool failOK) { int fd; + if (reln->rd_rel->relkind == RELKIND_VIEW) + return -1; if ((fd = (*(smgrsw[which].smgr_open)) (reln)) < 0) if (! failOK) elog(ERROR, "cannot open %s: %m", RelationGetRelationName(reln)); -- 2.40.0