Skip to content

Commit c7eb18f

Browse files
author
Hiroshi Inoue
committed
prevent open failure of VIEW
1 parent ebb0a20 commit c7eb18f

File tree

1 file changed

+3
-1
lines changed
  • src/backend/storage/smgr

1 file changed

+3
-1
lines changed

src/backend/storage/smgr/smgr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.43 2000/11/08 22:10:00 tgl Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.44 2000/11/13 09:06:36 inoue Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -262,6 +262,8 @@ smgropen(int16 which, Relation reln, bool failOK)
262262
{
263263
int fd;
264264

265+
if (reln->rd_rel->relkind == RELKIND_VIEW)
266+
return -1;
265267
if ((fd = (*(smgrsw[which].smgr_open)) (reln)) < 0)
266268
if (! failOK)
267269
elog(ERROR, "cannot open %s: %m", RelationGetRelationName(reln));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy