diff --git a/src/backend/access/nbtree/nbtcompare.c b/src/backend/access/nbtree/nbtcompare.c
index 6f2ad23..103c97a 100644
*** a/src/backend/access/nbtree/nbtcompare.c
--- b/src/backend/access/nbtree/nbtcompare.c
*************** btnamesortsupport(PG_FUNCTION_ARGS)
*** 360,362 ****
--- 360,408 ----
  	ssup->comparator = btnamefastcmp;
  	PG_RETURN_VOID();
  }
+ 
+ Datum
+ btnametextcmp(PG_FUNCTION_ARGS)
+ {
+ 	Name		arg1 = PG_GETARG_NAME(0);
+ 	text	   *arg2 = PG_GETARG_TEXT_PP(1);
+ 	size_t		len1 = strlen(NameStr(*arg1));
+ 	size_t		len2 = VARSIZE_ANY_EXHDR(arg2);
+ 	int32		result;
+ 
+ 	result = memcmp(NameStr(*arg1), VARDATA_ANY(arg2), Min(len1, len2));
+ 	if (result == 0)
+ 	{
+ 		if (len1 > len2)
+ 			result = A_GREATER_THAN_B;
+ 		else if (len1 < len2)
+ 			result = A_LESS_THAN_B;
+ 	}
+ 
+ 	PG_FREE_IF_COPY(arg2, 1);
+ 
+ 	PG_RETURN_INT32(result);
+ }
+ 
+ Datum
+ bttextnamecmp(PG_FUNCTION_ARGS)
+ {
+ 	text	   *arg1 = PG_GETARG_TEXT_PP(0);
+ 	Name		arg2 = PG_GETARG_NAME(1);
+ 	size_t		len1 = VARSIZE_ANY_EXHDR(arg1);
+ 	size_t		len2 = strlen(NameStr(*arg2));
+ 	int32		result;
+ 
+ 	result = memcmp(VARDATA_ANY(arg1), NameStr(*arg2), Min(len1, len2));
+ 	if (result == 0)
+ 	{
+ 		if (len1 > len2)
+ 			result = A_GREATER_THAN_B;
+ 		else if (len1 < len2)
+ 			result = A_LESS_THAN_B;
+ 	}
+ 
+ 	PG_FREE_IF_COPY(arg1, 0);
+ 
+ 	PG_RETURN_INT32(result);
+ }
diff --git a/src/backend/utils/adt/name.c b/src/backend/utils/adt/name.c
index c266da2..1ae3214 100644
*** a/src/backend/utils/adt/name.c
--- b/src/backend/utils/adt/name.c
*************** namege(PG_FUNCTION_ARGS)
*** 184,191 ****
  	PG_RETURN_BOOL(strncmp(NameStr(*arg1), NameStr(*arg2), NAMEDATALEN) >= 0);
  }
  
  
! /* (see char.c for comparison/operation routines) */
  
  int
  namecpy(Name n1, const NameData *n2)
--- 184,292 ----
  	PG_RETURN_BOOL(strncmp(NameStr(*arg1), NameStr(*arg2), NAMEDATALEN) >= 0);
  }
  
+ /*
+  * Cross-type comparison functions using name (i.e., strcmp) semantics.
+  */
  
! Datum
! nameeqtext(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(btnametextcmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) == 0);
! }
! 
! Datum
! namenetext(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(btnametextcmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) != 0);
! }
! 
! Datum
! namelttext(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(btnametextcmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) < 0);
! }
! 
! Datum
! nameletext(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(btnametextcmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) <= 0);
! }
! 
! Datum
! namegttext(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(btnametextcmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) > 0);
! }
! 
! Datum
! namegetext(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(btnametextcmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) >= 0);
! }
! 
! Datum
! texteqname(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(bttextnamecmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) == 0);
! }
! 
! Datum
! textnename(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(bttextnamecmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) != 0);
! }
! 
! Datum
! textltname(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(bttextnamecmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) < 0);
! }
! 
! Datum
! textlename(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(bttextnamecmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) <= 0);
! }
! 
! Datum
! textgtname(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(bttextnamecmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) > 0);
! }
! 
! Datum
! textgename(PG_FUNCTION_ARGS)
! {
! 	PG_RETURN_BOOL(DatumGetInt32(DirectFunctionCall2(bttextnamecmp,
! 													 PG_GETARG_DATUM(0),
! 													 PG_GETARG_DATUM(1))) >= 0);
! }
! 
! /*
!  * Miscellaneous support functions
!  */
  
  int
  namecpy(Name n1, const NameData *n2)
diff --git a/src/include/catalog/pg_amop.dat b/src/include/catalog/pg_amop.dat
index 075a54c..914cc2a 100644
*** a/src/include/catalog/pg_amop.dat
--- b/src/include/catalog/pg_amop.dat
***************
*** 317,322 ****
--- 317,373 ----
    amoprighttype => 'name', amopstrategy => '5', amopopr => '>(name,name)',
    amopmethod => 'btree' },
  
+ # crosstype operators name v text
+ { amopfamily => 'btree/name_ops', amoplefttype => 'name',
+   amoprighttype => 'text', amopstrategy => '1', amopopr => '~<~(name,text)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'name',
+   amoprighttype => 'text', amopstrategy => '2', amopopr => '~<=~(name,text)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'name',
+   amoprighttype => 'text', amopstrategy => '3', amopopr => '=(name,text)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'name',
+   amoprighttype => 'text', amopstrategy => '4', amopopr => '~>=~(name,text)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'name',
+   amoprighttype => 'text', amopstrategy => '5', amopopr => '~>~(name,text)',
+   amopmethod => 'btree' },
+ 
+ # crosstype operators text v name
+ { amopfamily => 'btree/name_ops', amoplefttype => 'text',
+   amoprighttype => 'name', amopstrategy => '1', amopopr => '~<~(text,name)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'text',
+   amoprighttype => 'name', amopstrategy => '2', amopopr => '~<=~(text,name)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'text',
+   amoprighttype => 'name', amopstrategy => '3', amopopr => '=(text,name)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'text',
+   amoprighttype => 'name', amopstrategy => '4', amopopr => '~>=~(text,name)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'text',
+   amoprighttype => 'name', amopstrategy => '5', amopopr => '~>~(text,name)',
+   amopmethod => 'btree' },
+ 
+ # crosstype operators text v text (same as text_pattern_ops)
+ { amopfamily => 'btree/name_ops', amoplefttype => 'text',
+   amoprighttype => 'text', amopstrategy => '1', amopopr => '~<~(text,text)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'text',
+   amoprighttype => 'text', amopstrategy => '2', amopopr => '~<=~(text,text)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'text',
+   amoprighttype => 'text', amopstrategy => '3', amopopr => '=(text,text)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'text',
+   amoprighttype => 'text', amopstrategy => '4', amopopr => '~>=~(text,text)',
+   amopmethod => 'btree' },
+ { amopfamily => 'btree/name_ops', amoplefttype => 'text',
+   amoprighttype => 'text', amopstrategy => '5', amopopr => '~>~(text,text)',
+   amopmethod => 'btree' },
+ 
  # btree text_ops
  
  { amopfamily => 'btree/text_ops', amoplefttype => 'text',
diff --git a/src/include/catalog/pg_amproc.dat b/src/include/catalog/pg_amproc.dat
index 0ef2c08..e0bf039 100644
*** a/src/include/catalog/pg_amproc.dat
--- b/src/include/catalog/pg_amproc.dat
***************
*** 152,157 ****
--- 152,166 ----
    amprocrighttype => 'name', amprocnum => '1', amproc => 'btnamecmp' },
  { amprocfamily => 'btree/name_ops', amproclefttype => 'name',
    amprocrighttype => 'name', amprocnum => '2', amproc => 'btnamesortsupport' },
+ { amprocfamily => 'btree/name_ops', amproclefttype => 'name',
+   amprocrighttype => 'text', amprocnum => '1', amproc => 'btnametextcmp' },
+ { amprocfamily => 'btree/name_ops', amproclefttype => 'text',
+   amprocrighttype => 'name', amprocnum => '1', amproc => 'bttextnamecmp' },
+ { amprocfamily => 'btree/name_ops', amproclefttype => 'text',
+   amprocrighttype => 'text', amprocnum => '1', amproc => 'bttext_pattern_cmp' },
+ { amprocfamily => 'btree/name_ops', amproclefttype => 'text',
+   amprocrighttype => 'text', amprocnum => '2',
+   amproc => 'bttext_pattern_sortsupport' },
  { amprocfamily => 'btree/numeric_ops', amproclefttype => 'numeric',
    amprocrighttype => 'numeric', amprocnum => '1', amproc => 'numeric_cmp' },
  { amprocfamily => 'btree/numeric_ops', amproclefttype => 'numeric',
diff --git a/src/include/catalog/pg_opclass.dat b/src/include/catalog/pg_opclass.dat
index 13928ba..9ea8783 100644
*** a/src/include/catalog/pg_opclass.dat
--- b/src/include/catalog/pg_opclass.dat
***************
*** 96,101 ****
--- 96,103 ----
  { opcmethod => 'btree', opcname => 'name_ops', opcfamily => 'btree/name_ops',
    opcintype => 'name', opckeytype => 'cstring' },
  
+ { opcmethod => 'btree', opcname => 'name_text_ops',
+   opcfamily => 'btree/name_ops', opcintype => 'text', opcdefault => 'f' },
  { opcmethod => 'hash', opcname => 'name_ops', opcfamily => 'hash/name_ops',
    opcintype => 'name' },
  { oid => '3125', oid_symbol => 'NUMERIC_BTREE_OPS_OID',
diff --git a/src/include/catalog/pg_operator.dat b/src/include/catalog/pg_operator.dat
index ce23c2f..d488c85 100644
*** a/src/include/catalog/pg_operator.dat
--- b/src/include/catalog/pg_operator.dat
***************
*** 74,80 ****
    oprright => 'char', oprresult => 'bool', oprcom => '=(char,char)',
    oprnegate => '<>(char,char)', oprcode => 'chareq', oprrest => 'eqsel',
    oprjoin => 'eqjoinsel' },
! { oid => '93', descr => 'equal',
    oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'name',
    oprright => 'name', oprresult => 'bool', oprcom => '=(name,name)',
    oprnegate => '<>(name,name)', oprcode => 'nameeq', oprrest => 'eqsel',
--- 74,80 ----
    oprright => 'char', oprresult => 'bool', oprcom => '=(char,char)',
    oprnegate => '<>(char,char)', oprcode => 'chareq', oprrest => 'eqsel',
    oprjoin => 'eqjoinsel' },
! { oid => '93', oid_symbol => 'NameEqualOperator', descr => 'equal',
    oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'name',
    oprright => 'name', oprresult => 'bool', oprcom => '=(name,name)',
    oprnegate => '<>(name,name)', oprcode => 'nameeq', oprrest => 'eqsel',
***************
*** 107,112 ****
--- 107,169 ----
    oprcode => 'starts_with', oprrest => 'prefixsel',
    oprjoin => 'prefixjoinsel' },
  
+ { oid => '254', oid_symbol => 'NameEqualTextOperator', descr => 'equal',
+   oprname => '=', oprcanmerge => 't', oprleft => 'name', oprright => 'text',
+   oprresult => 'bool', oprcom => '=(text,name)', oprnegate => '<>(name,text)',
+   oprcode => 'nameeqtext', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+ { oid => '255', descr => 'less than',
+   oprname => '~<~', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+   oprcom => '~>~(text,name)', oprnegate => '~>=~(name,text)',
+   oprcode => 'namelttext', oprrest => 'scalarltsel',
+   oprjoin => 'scalarltjoinsel' },
+ { oid => '256', descr => 'less than or equal',
+   oprname => '~<=~', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+   oprcom => '~>=~(text,name)', oprnegate => '~>~(name,text)',
+   oprcode => 'nameletext', oprrest => 'scalarlesel',
+   oprjoin => 'scalarlejoinsel' },
+ { oid => '257', descr => 'greater than or equal',
+   oprname => '~>=~', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+   oprcom => '~<=~(text,name)', oprnegate => '~<~(name,text)',
+   oprcode => 'namegetext', oprrest => 'scalargesel',
+   oprjoin => 'scalargejoinsel' },
+ { oid => '258', descr => 'greater than',
+   oprname => '~>~', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+   oprcom => '~<~(text,name)', oprnegate => '~<=~(name,text)',
+   oprcode => 'namegttext', oprrest => 'scalargtsel',
+   oprjoin => 'scalargtjoinsel' },
+ { oid => '259', descr => 'not equal',
+   oprname => '<>', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+   oprcom => '<>(text,name)', oprnegate => '=(name,text)',
+   oprcode => 'namenetext', oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+ { oid => '260', oid_symbol => 'TextEqualNameOperator', descr => 'equal',
+   oprname => '=', oprcanmerge => 't', oprleft => 'text', oprright => 'name',
+   oprresult => 'bool', oprcom => '=(name,text)', oprnegate => '<>(text,name)',
+   oprcode => 'texteqname', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+ { oid => '261', descr => 'less than',
+   oprname => '~<~', oprleft => 'text', oprright => 'name', oprresult => 'bool',
+   oprcom => '~>~(name,text)', oprnegate => '~>=~(text,name)',
+   oprcode => 'textltname', oprrest => 'scalarltsel',
+   oprjoin => 'scalarltjoinsel' },
+ { oid => '262', descr => 'less than or equal',
+   oprname => '~<=~', oprleft => 'text', oprright => 'name', oprresult => 'bool',
+   oprcom => '~>=~(name,text)', oprnegate => '~>~(text,name)',
+   oprcode => 'textlename', oprrest => 'scalarlesel',
+   oprjoin => 'scalarlejoinsel' },
+ { oid => '263', descr => 'greater than or equal',
+   oprname => '~>=~', oprleft => 'text', oprright => 'name', oprresult => 'bool',
+   oprcom => '~<=~(name,text)', oprnegate => '~<~(text,name)',
+   oprcode => 'textgename', oprrest => 'scalargesel',
+   oprjoin => 'scalargejoinsel' },
+ { oid => '264', descr => 'greater than',
+   oprname => '~>~', oprleft => 'text', oprright => 'name', oprresult => 'bool',
+   oprcom => '~<~(name,text)', oprnegate => '~<=~(text,name)',
+   oprcode => 'textgtname', oprrest => 'scalargtsel',
+   oprjoin => 'scalargtjoinsel' },
+ { oid => '265', descr => 'not equal',
+   oprname => '<>', oprleft => 'text', oprright => 'name', oprresult => 'bool',
+   oprcom => '<>(name,text)', oprnegate => '=(text,name)',
+   oprcode => 'textnename', oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+ 
  { oid => '349', descr => 'append element onto end of array',
    oprname => '||', oprleft => 'anyarray', oprright => 'anyelement',
    oprresult => 'anyarray', oprcode => 'array_append' },
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index 034a41e..b74a4cb 100644
*** a/src/include/catalog/pg_proc.dat
--- b/src/include/catalog/pg_proc.dat
***************
*** 673,678 ****
--- 673,721 ----
    proname => 'line_distance', prorettype => 'float8',
    proargtypes => 'line line', prosrc => 'line_distance' },
  
+ { oid => '240',
+   proname => 'nameeqtext', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'name text', prosrc => 'nameeqtext' },
+ { oid => '241',
+   proname => 'namelttext', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'name text', prosrc => 'namelttext' },
+ { oid => '242',
+   proname => 'nameletext', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'name text', prosrc => 'nameletext' },
+ { oid => '243',
+   proname => 'namegetext', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'name text', prosrc => 'namegetext' },
+ { oid => '244',
+   proname => 'namegttext', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'name text', prosrc => 'namegttext' },
+ { oid => '245',
+   proname => 'namenetext', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'name text', prosrc => 'namenetext' },
+ { oid => '246', descr => 'less-equal-greater',
+   proname => 'btnametextcmp', proleakproof => 't', prorettype => 'int4',
+   proargtypes => 'name text', prosrc => 'btnametextcmp' },
+ { oid => '247',
+   proname => 'texteqname', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'text name', prosrc => 'texteqname' },
+ { oid => '248',
+   proname => 'textltname', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'text name', prosrc => 'textltname' },
+ { oid => '249',
+   proname => 'textlename', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'text name', prosrc => 'textlename' },
+ { oid => '250',
+   proname => 'textgename', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'text name', prosrc => 'textgename' },
+ { oid => '251',
+   proname => 'textgtname', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'text name', prosrc => 'textgtname' },
+ { oid => '252',
+   proname => 'textnename', proleakproof => 't', prorettype => 'bool',
+   proargtypes => 'text name', prosrc => 'textnename' },
+ { oid => '253', descr => 'less-equal-greater',
+   proname => 'bttextnamecmp', proleakproof => 't', prorettype => 'int4',
+   proargtypes => 'text name', prosrc => 'bttextnamecmp' },
+ 
  { oid => '274',
    descr => 'current date and time - increments during transactions',
    proname => 'timeofday', provolatile => 'v', prorettype => 'text',
diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out
index 1f53780..a72881a 100644
*** a/src/test/regress/expected/join.out
--- b/src/test/regress/expected/join.out
*************** from
*** 4393,4410 ****
       left join uniquetbl u1 ON u1.f1 = t1.string4) ss
    on t0.f1 = ss.case1
  where ss.stringu2 !~* ss.case1;
!                                          QUERY PLAN                                         
! --------------------------------------------------------------------------------------------
!  Nested Loop
!    Join Filter: (CASE t1.ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END = t0.f1)
     ->  Nested Loop
!          ->  Seq Scan on int4_tbl i4
!          ->  Index Scan using tenk1_unique2 on tenk1 t1
!                Index Cond: (unique2 = i4.f1)
!                Filter: (stringu2 !~* CASE ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END)
!    ->  Materialize
!          ->  Seq Scan on text_tbl t0
! (9 rows)
  
  select t0.*
  from
--- 4393,4413 ----
       left join uniquetbl u1 ON u1.f1 = t1.string4) ss
    on t0.f1 = ss.case1
  where ss.stringu2 !~* ss.case1;
!                                             QUERY PLAN                                            
! --------------------------------------------------------------------------------------------------
!  Nested Loop Left Join
!    Join Filter: (u1.f1 = t1.string4)
     ->  Nested Loop
!          Join Filter: (CASE t1.ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END = t0.f1)
!          ->  Nested Loop
!                ->  Seq Scan on int4_tbl i4
!                ->  Index Scan using tenk1_unique2 on tenk1 t1
!                      Index Cond: (unique2 = i4.f1)
!                      Filter: (stringu2 !~* CASE ten WHEN 0 THEN 'doh!'::text ELSE NULL::text END)
!          ->  Materialize
!                ->  Seq Scan on text_tbl t0
!    ->  Seq Scan on uniquetbl u1
! (12 rows)
  
  select t0.*
  from
diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out
index 6072f6b..5edeaab 100644
*** a/src/test/regress/expected/opr_sanity.out
--- b/src/test/regress/expected/opr_sanity.out
*************** int24ge(smallint,integer)
*** 525,530 ****
--- 525,544 ----
  int42ge(integer,smallint)
  oideq(oid,oid)
  oidne(oid,oid)
+ nameeqtext(name,text)
+ namelttext(name,text)
+ nameletext(name,text)
+ namegetext(name,text)
+ namegttext(name,text)
+ namenetext(name,text)
+ btnametextcmp(name,text)
+ texteqname(text,name)
+ textltname(text,name)
+ textlename(text,name)
+ textgename(text,name)
+ textgtname(text,name)
+ textnename(text,name)
+ bttextnamecmp(text,name)
  float4eq(real,real)
  float4ne(real,real)
  float4lt(real,real)
diff --git a/src/test/regress/expected/partition_join.out b/src/test/regress/expected/partition_join.out
index c55de5d..a000695 100644
*** a/src/test/regress/expected/partition_join.out
--- b/src/test/regress/expected/partition_join.out
*************** SELECT t1.a, t2.b FROM prt1 t1, prt2 t2 
*** 1045,1058 ****
   Merge Join
     Merge Cond: ((t1.a = t2.b) AND (((((t1.*)::prt1))::text) = ((((t2.*)::prt2))::text)))
     ->  Sort
!          Sort Key: t1.a, ((((t1.*)::prt1))::text)
           ->  Result
                 ->  Append
                       ->  Seq Scan on prt1_p1 t1
                       ->  Seq Scan on prt1_p2 t1_1
                       ->  Seq Scan on prt1_p3 t1_2
     ->  Sort
!          Sort Key: t2.b, ((((t2.*)::prt2))::text)
           ->  Result
                 ->  Append
                       ->  Seq Scan on prt2_p1 t2
--- 1045,1058 ----
   Merge Join
     Merge Cond: ((t1.a = t2.b) AND (((((t1.*)::prt1))::text) = ((((t2.*)::prt2))::text)))
     ->  Sort
!          Sort Key: t1.a, ((((t1.*)::prt1))::text) USING ~<~
           ->  Result
                 ->  Append
                       ->  Seq Scan on prt1_p1 t1
                       ->  Seq Scan on prt1_p2 t1_1
                       ->  Seq Scan on prt1_p3 t1_2
     ->  Sort
!          Sort Key: t2.b, ((((t2.*)::prt2))::text) USING ~<~
           ->  Result
                 ->  Append
                       ->  Seq Scan on prt2_p1 t2
diff --git a/src/test/regress/expected/select_views.out b/src/test/regress/expected/select_views.out
index bf003ad..1aeed84 100644
*** a/src/test/regress/expected/select_views.out
--- b/src/test/regress/expected/select_views.out
*************** NOTICE:  f_leak => hamburger
*** 1326,1335 ****
  (1 row)
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_property_normal WHERE f_leak(passwd);
!                           QUERY PLAN                          
! --------------------------------------------------------------
   Seq Scan on customer
!    Filter: (f_leak(passwd) AND (name = (CURRENT_USER)::text))
  (2 rows)
  
  SELECT * FROM my_property_secure WHERE f_leak(passwd);
--- 1326,1335 ----
  (1 row)
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_property_normal WHERE f_leak(passwd);
!                       QUERY PLAN                      
! ------------------------------------------------------
   Seq Scan on customer
!    Filter: (f_leak(passwd) AND (name = CURRENT_USER))
  (2 rows)
  
  SELECT * FROM my_property_secure WHERE f_leak(passwd);
*************** NOTICE:  f_leak => passwd123
*** 1340,1351 ****
  (1 row)
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_property_secure WHERE f_leak(passwd);
!                   QUERY PLAN                   
! -----------------------------------------------
   Subquery Scan on my_property_secure
     Filter: f_leak(my_property_secure.passwd)
     ->  Seq Scan on customer
!          Filter: (name = (CURRENT_USER)::text)
  (4 rows)
  
  --
--- 1340,1351 ----
  (1 row)
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_property_secure WHERE f_leak(passwd);
!                  QUERY PLAN                  
! ---------------------------------------------
   Subquery Scan on my_property_secure
     Filter: f_leak(my_property_secure.passwd)
     ->  Seq Scan on customer
!          Filter: (name = CURRENT_USER)
  (4 rows)
  
  --
*************** NOTICE:  f_leak => hamburger
*** 1367,1376 ****
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_property_normal v
  		WHERE f_leak('passwd') AND f_leak(passwd);
!                                        QUERY PLAN                                        
! -----------------------------------------------------------------------------------------
   Seq Scan on customer
!    Filter: (f_leak('passwd'::text) AND f_leak(passwd) AND (name = (CURRENT_USER)::text))
  (2 rows)
  
  SELECT * FROM my_property_secure v
--- 1367,1376 ----
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_property_normal v
  		WHERE f_leak('passwd') AND f_leak(passwd);
!                                    QUERY PLAN                                    
! ---------------------------------------------------------------------------------
   Seq Scan on customer
!    Filter: (f_leak('passwd'::text) AND f_leak(passwd) AND (name = CURRENT_USER))
  (2 rows)
  
  SELECT * FROM my_property_secure v
*************** NOTICE:  f_leak => passwd
*** 1386,1397 ****
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_property_secure v
  		WHERE f_leak('passwd') AND f_leak(passwd);
!                                  QUERY PLAN                                 
! ----------------------------------------------------------------------------
   Subquery Scan on v
     Filter: f_leak(v.passwd)
     ->  Seq Scan on customer
!          Filter: (f_leak('passwd'::text) AND (name = (CURRENT_USER)::text))
  (4 rows)
  
  --
--- 1386,1397 ----
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_property_secure v
  		WHERE f_leak('passwd') AND f_leak(passwd);
!                              QUERY PLAN                             
! --------------------------------------------------------------------
   Subquery Scan on v
     Filter: f_leak(v.passwd)
     ->  Seq Scan on customer
!          Filter: (f_leak('passwd'::text) AND (name = CURRENT_USER))
  (4 rows)
  
  --
*************** NOTICE:  f_leak => 9801-2345-6789-0123
*** 1409,1423 ****
  (1 row)
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_credit_card_normal WHERE f_leak(cnum);
!                      QUERY PLAN                      
! -----------------------------------------------------
   Hash Join
     Hash Cond: (r.cid = l.cid)
     ->  Seq Scan on credit_card r
           Filter: f_leak(cnum)
     ->  Hash
           ->  Seq Scan on customer l
!                Filter: (name = (CURRENT_USER)::text)
  (7 rows)
  
  SELECT * FROM my_credit_card_secure WHERE f_leak(cnum);
--- 1409,1423 ----
  (1 row)
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_credit_card_normal WHERE f_leak(cnum);
!                  QUERY PLAN                  
! ---------------------------------------------
   Hash Join
     Hash Cond: (r.cid = l.cid)
     ->  Seq Scan on credit_card r
           Filter: f_leak(cnum)
     ->  Hash
           ->  Seq Scan on customer l
!                Filter: (name = CURRENT_USER)
  (7 rows)
  
  SELECT * FROM my_credit_card_secure WHERE f_leak(cnum);
*************** NOTICE:  f_leak => 1111-2222-3333-4444
*** 1428,1435 ****
  (1 row)
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_credit_card_secure WHERE f_leak(cnum);
!                         QUERY PLAN                         
! -----------------------------------------------------------
   Subquery Scan on my_credit_card_secure
     Filter: f_leak(my_credit_card_secure.cnum)
     ->  Hash Join
--- 1428,1435 ----
  (1 row)
  
  EXPLAIN (COSTS OFF) SELECT * FROM my_credit_card_secure WHERE f_leak(cnum);
!                     QUERY PLAN                     
! ---------------------------------------------------
   Subquery Scan on my_credit_card_secure
     Filter: f_leak(my_credit_card_secure.cnum)
     ->  Hash Join
*************** EXPLAIN (COSTS OFF) SELECT * FROM my_cre
*** 1437,1443 ****
           ->  Seq Scan on credit_card r
           ->  Hash
                 ->  Seq Scan on customer l
!                      Filter: (name = (CURRENT_USER)::text)
  (8 rows)
  
  --
--- 1437,1443 ----
           ->  Seq Scan on credit_card r
           ->  Hash
                 ->  Seq Scan on customer l
!                      Filter: (name = CURRENT_USER)
  (8 rows)
  
  --
*************** EXPLAIN (COSTS OFF) SELECT * FROM my_cre
*** 1471,1477 ****
                       ->  Seq Scan on credit_card r_1
                       ->  Hash
                             ->  Seq Scan on customer l_1
!                                  Filter: (name = (CURRENT_USER)::text)
  (13 rows)
  
  SELECT * FROM my_credit_card_usage_secure
--- 1471,1477 ----
                       ->  Seq Scan on credit_card r_1
                       ->  Hash
                             ->  Seq Scan on customer l_1
!                                  Filter: (name = CURRENT_USER)
  (13 rows)
  
  SELECT * FROM my_credit_card_usage_secure
*************** EXPLAIN (COSTS OFF) SELECT * FROM my_cre
*** 1502,1508 ****
                       ->  Seq Scan on credit_card r_1
                       ->  Hash
                             ->  Seq Scan on customer l
!                                  Filter: (name = (CURRENT_USER)::text)
  (13 rows)
  
  --
--- 1502,1508 ----
                       ->  Seq Scan on credit_card r_1
                       ->  Hash
                             ->  Seq Scan on customer l
!                                  Filter: (name = CURRENT_USER)
  (13 rows)
  
  --
