mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Inline fastgetattr and others so data access does not use function
calls.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.27 1998/01/25 05:12:54 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.28 1998/01/31 04:38:17 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -219,7 +219,7 @@ Async_Notify(char *relname)
|
||||
|
||||
while (HeapTupleIsValid(lTuple = heap_getnext(sRel, 0, &b)))
|
||||
{
|
||||
d = heap_getattr(lTuple, b, Anum_pg_listener_notify,
|
||||
d = heap_getattr(lTuple, Anum_pg_listener_notify,
|
||||
tdesc, &isnull);
|
||||
if (!DatumGetInt32(d))
|
||||
{
|
||||
@ -294,12 +294,12 @@ Async_NotifyAtCommit()
|
||||
|
||||
while (HeapTupleIsValid(lTuple = heap_getnext(sRel, 0, &b)))
|
||||
{
|
||||
d = heap_getattr(lTuple, b, Anum_pg_listener_relname,
|
||||
d = heap_getattr(lTuple, Anum_pg_listener_relname,
|
||||
tdesc, &isnull);
|
||||
|
||||
if (AsyncExistsPendingNotify((char *) DatumGetPointer(d)))
|
||||
{
|
||||
d = heap_getattr(lTuple, b, Anum_pg_listener_pid,
|
||||
d = heap_getattr(lTuple, Anum_pg_listener_pid,
|
||||
tdesc, &isnull);
|
||||
|
||||
if (MyProcPid == DatumGetInt32(d))
|
||||
@ -444,12 +444,12 @@ Async_Listen(char *relname, int pid)
|
||||
s = heap_beginscan(lDesc, 0, false, 0, (ScanKey) NULL);
|
||||
while (HeapTupleIsValid(htup = heap_getnext(s, 0, &b)))
|
||||
{
|
||||
d = heap_getattr(htup, b, Anum_pg_listener_relname, tdesc,
|
||||
d = heap_getattr(htup, Anum_pg_listener_relname, tdesc,
|
||||
&isnull);
|
||||
relnamei = DatumGetPointer(d);
|
||||
if (!strncmp(relnamei, relname, NAMEDATALEN))
|
||||
{
|
||||
d = heap_getattr(htup, b, Anum_pg_listener_pid, tdesc, &isnull);
|
||||
d = heap_getattr(htup, Anum_pg_listener_pid, tdesc, &isnull);
|
||||
pid = DatumGetInt32(d);
|
||||
if (pid == MyProcPid)
|
||||
{
|
||||
@ -607,7 +607,7 @@ Async_NotifyFrontEnd()
|
||||
|
||||
while (HeapTupleIsValid(lTuple = heap_getnext(sRel, 0, &b)))
|
||||
{
|
||||
d = heap_getattr(lTuple, b, Anum_pg_listener_relname,
|
||||
d = heap_getattr(lTuple, Anum_pg_listener_relname,
|
||||
tdesc, &isnull);
|
||||
rTuple = heap_modifytuple(lTuple, b, lRel, value, nulls, repl);
|
||||
heap_replace(lRel, &lTuple->t_ctid, rTuple);
|
||||
|
Reference in New Issue
Block a user