Like operator for name type

Lists: pgsql-hackers
From: Mohsen SM <mohsensoodkhah(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Like operator for name type
Date: 2013-12-14 07:12:34
Message-ID: CAGT6x6cvn2TbWOmQqN323DHLXRgPT8BRRhZDwyEM397Qyx3ifQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I don't find where of code run the like operation for name Type.
can you tell me where compare Like clues with one column of name type ?
I don't find function for this operation in /src/backend/utils/adt/name.c
when I was in debugging mode and get break point on all functions.
thanks.


From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Mohsen SM *EXTERN*" <mohsensoodkhah(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Like operator for name type
Date: 2013-12-16 09:03:16
Message-ID: A737B7A37273E048B164557ADEF4A58B17C838E1@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Mohsen SM wrote:
> I don't find where of code run the like operation for name Type.
>
> can you tell me where compare Like clues with one column of name type ?
>
> I don't find function for this operation in /src/backend/utils/adt/name.c when I was in debugging mode
> and get break point on all functions.

Do you mean LIKE in a query like this?

test=> EXPLAIN VERBOSE SELECT oid FROM pg_class WHERE relname LIKE 'pg_%';
QUERY PLAN
----------------------------------------------------------------------
Seq Scan on pg_catalog.pg_class (cost=0.00..12.80 rows=230 width=4)
Output: oid
Filter: (pg_class.relname ~~ 'pg_%'::text)
(3 rows)

That would use textlike() in backend/utils/adt/like.c

Yours,
Laurenz Albe