1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-27 07:42:10 +03:00

Add TEMP tables/indexes. Add COPY pfree(). Other cleanups.

This commit is contained in:
Bruce Momjian
1999-02-02 03:45:56 +00:00
parent 7fc75517df
commit 4390b0bfbe
69 changed files with 7195 additions and 6851 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.45 1998/12/15 12:46:19 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.46 1999/02/02 03:44:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -231,7 +231,7 @@ ReadBufferWithBufferLock(Relation reln,
bool isLocalBuf;
extend = (blockNum == P_NEW);
isLocalBuf = reln->rd_islocal;
isLocalBuf = reln->rd_myxactonly;
if (isLocalBuf)
{
@@ -1374,7 +1374,7 @@ BlockNumber
RelationGetNumberOfBlocks(Relation relation)
{
return
((relation->rd_islocal) ? relation->rd_nblocks :
((relation->rd_myxactonly) ? relation->rd_nblocks :
smgrnblocks(DEFAULT_SMGR, relation));
}
@@ -1395,7 +1395,7 @@ ReleaseRelationBuffers(Relation rel)
int holding = 0;
BufferDesc *buf;
if (rel->rd_islocal)
if (rel->rd_myxactonly)
{
for (i = 0; i < NLocBuffer; i++)
{
@@ -1564,7 +1564,7 @@ BlowawayRelationBuffers(Relation rel, BlockNumber block)
int i;
BufferDesc *buf;
if (rel->rd_islocal)
if (rel->rd_myxactonly)
{
for (i = 0; i < NLocBuffer; i++)
{

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.45 1999/01/21 22:48:09 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.46 1999/02/02 03:44:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,7 +47,6 @@
#include "utils/builtins.h" /* for namestrcpy() */
#include "utils/rel.h"
#include "utils/relcache.h"
#include "utils/syscache.h"
/*
* Warning, Will Robinson... In order to pack data into an inversion
@@ -120,20 +119,16 @@ inv_create(int flags)
sprintf(objname, "xinv%d", file_oid);
sprintf(indname, "xinx%d", file_oid);
if (SearchSysCacheTuple(RELNAME,
PointerGetDatum(objname),
0, 0, 0) != NULL)
if (RelnameFindRelid(objname) != InvalidOid)
{
elog(ERROR,
"internal error: %s already exists -- cannot create large obj",
objname);
}
if (SearchSysCacheTuple(RELNAME,
PointerGetDatum(indname),
0, 0, 0) != NULL)
if (RelnameFindRelid(indname) != InvalidOid)
{
elog(ERROR,
"internal error: %s already exists -- cannot create large obj",
"internal error: %s already exists -- cannot create large obj",
indname);
}
@@ -153,7 +148,7 @@ inv_create(int flags)
* be located on whatever storage manager the user requested.
*/
heap_create_with_catalog(objname, tupdesc, RELKIND_LOBJECT);
heap_create_with_catalog(objname, tupdesc, RELKIND_LOBJECT, false);
/* make the relation visible in this transaction */
CommandCounterIncrement();