summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/indxpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/path/indxpath.c')
-rw-r--r--src/backend/optimizer/path/indxpath.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index 8a2e808cc3..189793c2cc 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.227 2008/02/07 17:53:53 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.228 2008/03/25 22:42:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2711,8 +2711,7 @@ prefix_quals(Node *leftop, Oid opfamily,
switch (prefix_const->consttype)
{
case TEXTOID:
- prefix = DatumGetCString(DirectFunctionCall1(textout,
- prefix_const->constvalue));
+ prefix = TextDatumGetCString(prefix_const->constvalue);
break;
case BYTEAOID:
prefix = DatumGetCString(DirectFunctionCall1(byteaout,
@@ -2868,15 +2867,15 @@ static Datum
string_to_datum(const char *str, Oid datatype)
{
/*
- * We cheat a little by assuming that textin() will do for bpchar and
- * varchar constants too...
+ * We cheat a little by assuming that CStringGetTextDatum() will do for
+ * bpchar and varchar constants too...
*/
if (datatype == NAMEOID)
return DirectFunctionCall1(namein, CStringGetDatum(str));
else if (datatype == BYTEAOID)
return DirectFunctionCall1(byteain, CStringGetDatum(str));
else
- return DirectFunctionCall1(textin, CStringGetDatum(str));
+ return CStringGetTextDatum(str);
}
/*