mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Update textin() and textout() to new fmgr style. This is just phase
one of updating the whole text datatype, but there are so dang many calls of these two routines that it seems worth a separate commit.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.20 2000/06/09 01:11:09 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.21 2000/07/05 23:11:35 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* input routine largely stolen from boxin().
|
||||
@ -126,38 +126,6 @@ tidne(ItemPointer arg1, ItemPointer arg2)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NOT_USED
|
||||
text *
|
||||
tid_text(ItemPointer tid)
|
||||
{
|
||||
char *str;
|
||||
|
||||
if (!tid)
|
||||
return (text *) NULL;
|
||||
str = tidout(tid);
|
||||
|
||||
return textin(str);
|
||||
} /* tid_text() */
|
||||
#endif
|
||||
|
||||
#ifdef NOT_USED
|
||||
ItemPointer
|
||||
text_tid(const text *string)
|
||||
{
|
||||
ItemPointer result;
|
||||
char *str;
|
||||
|
||||
if (!string)
|
||||
return (ItemPointer) 0;
|
||||
|
||||
str = textout((text *) string);
|
||||
result = tidin(str);
|
||||
pfree(str);
|
||||
|
||||
return result;
|
||||
} /* text_tid() */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Functions to get latest tid of a specified tuple.
|
||||
*
|
||||
@ -197,7 +165,8 @@ currtid_byrelname(PG_FUNCTION_ARGS)
|
||||
char *str;
|
||||
Relation rel;
|
||||
|
||||
str = textout(relname);
|
||||
str = DatumGetCString(DirectFunctionCall1(textout,
|
||||
PointerGetDatum(relname)));
|
||||
|
||||
result = (ItemPointer) palloc(sizeof(ItemPointerData));
|
||||
ItemPointerSetInvalid(result);
|
||||
|
Reference in New Issue
Block a user