mirror of
https://github.com/postgres/postgres.git
synced 2025-11-29 23:43:17 +03:00
pgindent run for 8.3.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.74 2007/08/12 20:39:14 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.75 2007/11/15 21:14:41 momjian Exp $
|
||||
*
|
||||
* NOTE:
|
||||
* This is a new (Feb. 05, 1999) implementation of the allocation set
|
||||
@@ -330,13 +330,13 @@ AllocSetContextCreate(MemoryContext parent,
|
||||
context->nextBlockSize = initBlockSize;
|
||||
|
||||
/*
|
||||
* Compute the allocation chunk size limit for this context. It can't
|
||||
* be more than ALLOC_CHUNK_LIMIT because of the fixed number of
|
||||
* freelists. If maxBlockSize is small then requests exceeding the
|
||||
* maxBlockSize should be treated as large chunks, too. We have to
|
||||
* have allocChunkLimit a power of two, because the requested and
|
||||
* actually-allocated sizes of any chunk must be on the same side of
|
||||
* the limit, else we get confused about whether the chunk is "big".
|
||||
* Compute the allocation chunk size limit for this context. It can't be
|
||||
* more than ALLOC_CHUNK_LIMIT because of the fixed number of freelists.
|
||||
* If maxBlockSize is small then requests exceeding the maxBlockSize
|
||||
* should be treated as large chunks, too. We have to have
|
||||
* allocChunkLimit a power of two, because the requested and
|
||||
* actually-allocated sizes of any chunk must be on the same side of the
|
||||
* limit, else we get confused about whether the chunk is "big".
|
||||
*/
|
||||
context->allocChunkLimit = ALLOC_CHUNK_LIMIT;
|
||||
while (context->allocChunkLimit >
|
||||
@@ -935,9 +935,9 @@ AllocSetRealloc(MemoryContext context, void *pointer, Size size)
|
||||
* Small-chunk case. We just do this by brute force, ie, allocate a
|
||||
* new chunk and copy the data. Since we know the existing data isn't
|
||||
* huge, this won't involve any great memcpy expense, so it's not
|
||||
* worth being smarter. (At one time we tried to avoid memcpy when
|
||||
* it was possible to enlarge the chunk in-place, but that turns out
|
||||
* to misbehave unpleasantly for repeated cycles of
|
||||
* worth being smarter. (At one time we tried to avoid memcpy when it
|
||||
* was possible to enlarge the chunk in-place, but that turns out to
|
||||
* misbehave unpleasantly for repeated cycles of
|
||||
* palloc/repalloc/pfree: the eventually freed chunks go into the
|
||||
* wrong freelist for the next initial palloc request, and so we leak
|
||||
* memory indefinitely. See pgsql-hackers archives for 2007-08-11.)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.103 2007/04/26 23:24:44 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.104 2007/11/15 21:14:41 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -161,7 +161,7 @@ PortalListGetPrimaryStmt(List *stmts)
|
||||
|
||||
foreach(lc, stmts)
|
||||
{
|
||||
Node *stmt = (Node *) lfirst(lc);
|
||||
Node *stmt = (Node *) lfirst(lc);
|
||||
|
||||
if (IsA(stmt, PlannedStmt))
|
||||
{
|
||||
@@ -292,16 +292,16 @@ PortalDefineQuery(Portal portal,
|
||||
const char *sourceText,
|
||||
const char *commandTag,
|
||||
List *stmts,
|
||||
CachedPlan *cplan)
|
||||
CachedPlan * cplan)
|
||||
{
|
||||
AssertArg(PortalIsValid(portal));
|
||||
AssertState(portal->status == PORTAL_NEW);
|
||||
|
||||
Assert(commandTag != NULL || stmts == NIL);
|
||||
|
||||
portal->prepStmtName = prepStmtName ?
|
||||
portal->prepStmtName = prepStmtName ?
|
||||
MemoryContextStrdup(PortalGetHeapMemory(portal), prepStmtName) : NULL;
|
||||
portal->sourceText = sourceText ?
|
||||
portal->sourceText = sourceText ?
|
||||
MemoryContextStrdup(PortalGetHeapMemory(portal), sourceText) : NULL;
|
||||
portal->commandTag = commandTag;
|
||||
portal->stmts = stmts;
|
||||
@@ -468,7 +468,8 @@ PortalHashTableDeleteAll(void)
|
||||
hash_seq_init(&status, PortalHashTable);
|
||||
while ((hentry = hash_seq_search(&status)) != NULL)
|
||||
{
|
||||
Portal portal = hentry->portal;
|
||||
Portal portal = hentry->portal;
|
||||
|
||||
if (portal->status != PORTAL_ACTIVE)
|
||||
PortalDrop(portal, false);
|
||||
}
|
||||
@@ -883,8 +884,8 @@ pg_cursor(PG_FUNCTION_ARGS)
|
||||
oldcontext = MemoryContextSwitchTo(per_query_ctx);
|
||||
|
||||
/*
|
||||
* build tupdesc for result tuples. This must match the definition of
|
||||
* the pg_cursors view in system_views.sql
|
||||
* build tupdesc for result tuples. This must match the definition of the
|
||||
* pg_cursors view in system_views.sql
|
||||
*/
|
||||
tupdesc = CreateTemplateTupleDesc(6, false);
|
||||
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
|
||||
|
||||
Reference in New Issue
Block a user