Commit 36933b46 authored by Hiroshi Inoue's avatar Hiroshi Inoue

avoid opening view files.

parent 5ce0804b
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/xlog_bufmgr.c,v 1.3 2000/11/10 03:53:44 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/xlog_bufmgr.c,v 1.4 2000/11/22 02:19:14 inoue Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1158,7 +1158,8 @@ BlockNumber ...@@ -1158,7 +1158,8 @@ BlockNumber
RelationGetNumberOfBlocks(Relation relation) RelationGetNumberOfBlocks(Relation relation)
{ {
return ((relation->rd_myxactonly) ? relation->rd_nblocks : return ((relation->rd_myxactonly) ? relation->rd_nblocks :
smgrnblocks(DEFAULT_SMGR, relation)); ((relation->rd_rel->relkind == RELKIND_VIEW) ? 0 :
smgrnblocks(DEFAULT_SMGR, relation)));
} }
/* --------------------------------------------------------------------- /* ---------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment