mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan; descriptor; bootstrap can create multi-key indexes; pg_procname index now is multi-key index; oidint2, oidint4, oidname are gone (must be removed from regression tests); use System Cache rather than sequential scan in many places; heap_modifytuple no longer takes buffer parameter; remove unused buffer parameter in a few other functions; oid8 is not index-able; remove some use of single-character variable names; cleanup Buffer variables usage and scan descriptor looping; cleaned up allocation and freeing of tuples; 18k lines of diff;
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.18 1998/06/15 19:29:42 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.19 1998/08/19 02:03:16 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -58,7 +58,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
|
||||
*probinstring;
|
||||
Datum probinattr;
|
||||
func_ptr user_fn;
|
||||
Relation rdesc;
|
||||
Relation rel;
|
||||
bool isnull;
|
||||
|
||||
if (procedureId == procedureId_save)
|
||||
@@ -71,7 +71,8 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
|
||||
* The procedure isn't a builtin, so we'll have to do a catalog lookup
|
||||
* to find its pg_proc entry.
|
||||
*/
|
||||
procedureTuple = SearchSysCacheTuple(PROOID, ObjectIdGetDatum(procedureId),
|
||||
procedureTuple = SearchSysCacheTuple(PROOID,
|
||||
ObjectIdGetDatum(procedureId),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(procedureTuple))
|
||||
{
|
||||
@@ -87,13 +88,13 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
|
||||
/*
|
||||
* Extract the procedure info from the pg_proc tuple. Since probin is
|
||||
* varlena, do a amgetattr() on the procedure tuple. To do that, we
|
||||
* need the rdesc for the procedure relation, so...
|
||||
* need the rel for the procedure relation, so...
|
||||
*/
|
||||
|
||||
/* open pg_procedure */
|
||||
|
||||
rdesc = heap_openr(ProcedureRelationName);
|
||||
if (!RelationIsValid(rdesc))
|
||||
rel = heap_openr(ProcedureRelationName);
|
||||
if (!RelationIsValid(rel))
|
||||
{
|
||||
elog(ERROR, "fmgr: Could not open relation %s",
|
||||
ProcedureRelationName);
|
||||
@@ -101,10 +102,10 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
|
||||
}
|
||||
probinattr = heap_getattr(procedureTuple,
|
||||
Anum_pg_proc_probin,
|
||||
RelationGetTupleDescriptor(rdesc), &isnull);
|
||||
RelationGetTupleDescriptor(rel), &isnull);
|
||||
if (!PointerIsValid(probinattr) /* || isnull */ )
|
||||
{
|
||||
heap_close(rdesc);
|
||||
heap_close(rel);
|
||||
elog(ERROR, "fmgr: Could not extract probin for %d from %s",
|
||||
procedureId, ProcedureRelationName);
|
||||
return ((func_ptr) NULL);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.17 1998/06/15 19:29:44 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.18 1998/08/19 02:03:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -172,7 +172,7 @@ fmgr_info(Oid procedureId, FmgrInfo *finfo)
|
||||
if (!(fcp = fmgr_isbuiltin(procedureId)))
|
||||
{
|
||||
procedureTuple = SearchSysCacheTuple(PROOID,
|
||||
ObjectIdGetDatum(procedureId),
|
||||
ObjectIdGetDatum(procedureId),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(procedureTuple))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user