prevent open failure of VIEW
This commit is contained in:
parent
ebb0a20149
commit
c7eb18fcf4
@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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;
|
int fd;
|
||||||
|
|
||||||
|
if (reln->rd_rel->relkind == RELKIND_VIEW)
|
||||||
|
return -1;
|
||||||
if ((fd = (*(smgrsw[which].smgr_open)) (reln)) < 0)
|
if ((fd = (*(smgrsw[which].smgr_open)) (reln)) < 0)
|
||||||
if (! failOK)
|
if (! failOK)
|
||||||
elog(ERROR, "cannot open %s: %m", RelationGetRelationName(reln));
|
elog(ERROR, "cannot open %s: %m", RelationGetRelationName(reln));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user