*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.32 1999/05/25 16:07:15 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.33 1999/06/19 04:54:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
attributeNumber++)
{
int16 support;
- Form_pg_amproc form;
+ Form_pg_amproc aform;
RegProcedure *loc;
loc = &indexSupport[((attributeNumber - 1) * maxSupportNumber)];
while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
{
- form = (Form_pg_amproc) GETSTRUCT(tuple);
- loc[(form->amprocnum - 1)] = form->amproc;
+ aform = (Form_pg_amproc) GETSTRUCT(tuple);
+ loc[(aform->amprocnum - 1)] = aform->amproc;
}
heap_endscan(scan);
while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
{
- Form_pg_amop form;
+ Form_pg_amop aform;
- form = (Form_pg_amop) GETSTRUCT(tuple);
+ aform = (Form_pg_amop) GETSTRUCT(tuple);
OperatorRelationFillScanKeyEntry(operatorRelation,
- form->amopopr,
- StrategyMapGetScanKeyEntry(map, form->amopstrategy));
+ aform->amopopr,
+ StrategyMapGetScanKeyEntry(map, aform->amopstrategy));
}
heap_endscan(scan);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.78 1999/06/16 11:01:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.79 1999/06/19 04:54:11 momjian Exp $
*
*
* INTERFACE ROUTINES
HeapScanDesc pg_am_scan;
HeapTuple pg_am_tuple;
ScanKeyData key;
- Form_pg_am form;
+ Form_pg_am aform;
/* ----------------
* form a scan key for the pg_am relation
* if found am tuple, then copy the form and return the copy
* ----------------
*/
- form = (Form_pg_am) palloc(sizeof *form);
- memcpy(form, GETSTRUCT(pg_am_tuple), sizeof *form);
+ aform = (Form_pg_am) palloc(sizeof *aform);
+ memcpy(aform, GETSTRUCT(pg_am_tuple), sizeof *aform);
heap_endscan(pg_am_scan);
heap_close(pg_am_desc);
- return form;
+ return aform;
}
/* ----------------------------------------------------------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.46 1999/05/25 22:40:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.47 1999/06/19 04:54:12 momjian Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
{
HeapTuple typeTuple;
- Form_pg_type form;
+ Form_pg_type tform;
char *typename;
int attnelems;
typeTuple = SearchSysCacheTuple(TYPNAME,
PointerGetDatum(typename),
0, 0, 0);
- form = (Form_pg_type) GETSTRUCT(typeTuple);
+ tform = (Form_pg_type) GETSTRUCT(typeTuple);
if (!HeapTupleIsValid(typeTuple))
elog(ERROR, "Add: type \"%s\" nonexistent", typename);
namestrcpy(&(attribute->attname), colDef->colname);
attribute->atttypid = typeTuple->t_data->t_oid;
- attribute->attlen = form->typlen;
+ attribute->attlen = tform->typlen;
attribute->attdisbursion = 0;
attribute->attcacheoff = -1;
attribute->atttypmod = colDef->typename->typmod;
attribute->attnum = i;
- attribute->attbyval = form->typbyval;
+ attribute->attbyval = tform->typbyval;
attribute->attnelems = attnelems;
- attribute->attisset = (bool) (form->typtype == 'c');
- attribute->attalign = form->typalign;
+ attribute->attisset = (bool) (tform->typtype == 'c');
+ attribute->attalign = tform->typalign;
attribute->attnotnull = false;
attribute->atthasdef = (colDef->defval != NULL);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.14 1999/05/25 16:09:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.15 1999/06/19 04:54:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
portals = newp;
else
libpq_raise(&PortalError,
- form("Cannot alloc more memory in portals_realloc"));
+ varargform("Cannot alloc more memory in portals_realloc"));
for (i = oldsize; i < portals_array_size; i++)
portals[i] = (PortalEntry *) NULL;
caddr_t addr;
if (size <= 0)
- libpq_raise(&MemoryError, form("Invalid argument to pbuf_alloc()."));
+ libpq_raise(&MemoryError, varargform("Invalid argument to pbuf_alloc()."));
addr = (caddr_t) palloc(size);
if (addr == (caddr_t) NULL)
- libpq_raise(&MemoryError, form("Cannot Allocate space."));
+ libpq_raise(&MemoryError, varargform("Cannot Allocate space."));
return addr;
}
if (pointer)
pfree(pointer);
else
- libpq_raise(&MemoryError, form("Tried to free NULL memory pointer"));
+ libpq_raise(&MemoryError, varargform("Tried to free NULL memory pointer"));
}
int i;
if ((i = pbuf_getIndex(pname)) == -1)
- libpq_raise(&PortalError, form("Portal %s does not exist.", pname));
+ libpq_raise(&PortalError, varargform("Portal %s does not exist.", pname));
pbuf_freePortal(portals[i]->portal);
pbuf_freeEntry(i);
if (group == NULL)
libpq_raise(&PortalError,
- form("Group index %d out of bound.", group_index));
+ varargform("Group index %d out of bound.", group_index));
return group;
}
return i;
libpq_raise(&PortalError,
- form("Field-name %s does not exist.", field_name));
+ varargform("Field-name %s does not exist.", field_name));
/* not reached, here to make compiler happy */
return 0;
{
if (field_number < 0 || field_number >= group->no_fields)
libpq_raise(&PortalError,
- form("Field number %d out of bound.", field_number));
+ varargform("Field number %d out of bound.", field_number));
}
/* --------------------------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.56 1999/05/25 22:41:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.57 1999/06/19 04:54:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
HeapScanDesc scan;
HeapTuple tuple;
ScanKeyData entry[3];
- Form_pg_amop form;
+ Form_pg_amop aform;
pred_var = (Var *) get_leftop(predicate);
pred_const = (Const *) get_rightop(predicate);
elog(DEBUG, "clause_pred_clause_test: unknown pred_op");
return false;
}
- form = (Form_pg_amop) GETSTRUCT(tuple);
+ aform = (Form_pg_amop) GETSTRUCT(tuple);
/* Get the predicate operator's strategy number (1 to 5) */
- pred_strategy = (StrategyNumber) form->amopstrategy;
+ pred_strategy = (StrategyNumber) aform->amopstrategy;
/* Remember which operator class this strategy number came from */
- opclass_id = form->amopclaid;
+ opclass_id = aform->amopclaid;
heap_endscan(scan);
elog(DEBUG, "clause_pred_clause_test: unknown clause_op");
return false;
}
- form = (Form_pg_amop) GETSTRUCT(tuple);
+ aform = (Form_pg_amop) GETSTRUCT(tuple);
/* Get the restriction clause operator's strategy number (1 to 5) */
- clause_strategy = (StrategyNumber) form->amopstrategy;
+ clause_strategy = (StrategyNumber) aform->amopstrategy;
heap_endscan(scan);
elog(DEBUG, "clause_pred_clause_test: unknown test_op");
return false;
}
- form = (Form_pg_amop) GETSTRUCT(tuple);
+ aform = (Form_pg_amop) GETSTRUCT(tuple);
/* Get the test operator */
- test_op = form->amopopr;
+ test_op = aform->amopopr;
heap_endscan(scan);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.11 1999/05/25 16:12:26 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.12 1999/06/19 04:54:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* ----------------
- * form
+ * varargform
* ----------------
*/
char *
-form(const char *fmt,...)
+varargform(const char *fmt,...)
{
va_list args;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.21 1999/06/12 14:07:26 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.22 1999/06/19 04:54:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static char *
PortalVariableMemoryGetName(PortalVariableMemory this)
{
- return form("%s-var", PortalVariableMemoryGetPortal(this)->name);
+ return varargform("%s-var", PortalVariableMemoryGetPortal(this)->name);
}
/* ----------------
static char *
PortalHeapMemoryGetName(PortalHeapMemory this)
{
- return form("%s-heap", PortalHeapMemoryGetPortal(this)->name);
+ return varargform("%s-heap", PortalHeapMemoryGetPortal(this)->name);
}
/* ----------------
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.55 1999/05/25 16:13:22 momjian Exp $
+ * $Id: c.h,v 1.56 1999/06/19 04:54:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define LogTrap(condition, exception, printArgs) \
{ if ((assert_enabled) && (condition)) \
ExceptionalCondition(CppAsString(condition), &(exception), \
- form printArgs, __FILE__, __LINE__); }
+ varargform printArgs, __FILE__, __LINE__); }
/*
* LogTrapMacro is the same as LogTrap but it's intended for use in macros:
((bool) ((! assert_enabled) || (! condition) || \
(ExceptionalCondition(CppAsString(condition), \
&(exception), \
- form printArgs, __FILE__, __LINE__))))
+ varargform printArgs, __FILE__, __LINE__))))
#ifndef USE_ASSERT_CHECKING
#define LogAssert(condition, printArgs)
/* ----------------
- * form is used by assert and the exception handling stuff
+ * varargform is used by assert and the exception handling stuff
* ----------------
*/
-extern char *form(const char *fmt,...);
+extern char *varargform(const char *fmt,...);