سلام، وقتتون بخیر.
اگه همون مثالی که فرمودید رو بخوایم داشته باشیم (ایندکس SP-GiST روی شماره موبایل)
یه نمونه کوئری میشه ازش بدید که شماره هایی که مثلا با ۹۱۲ شروع شدن رو بگیریم؟
سلام سلامت باشید
create table points(p point); insert into points(p) values (point '(912,1312561)'), (point '(913,3121212)'), (point '(912,6565233)'), (point '(912,5541232)'), (point '(913,83131585)'), (point '(914,454656)'); create index points_quad_idx on points using spgist(p); select amop.amopopr::regoperator, amop.amopstrategy from pg_opclass opc, pg_opfamily opf, pg_am am, pg_amop amop where opc.opcname = 'quad_point_ops' and opf.oid = opc.opcfamily and am.oid = opf.opfmethod and amop.amopfamily = opc.opcfamily and am.amname = 'spgist' and amop.amoplefttype = opc.opcintype;
البته این یک مثال هست که از pointها به عنوان geo استفاده میکنیم و اون رو تبدیل به شماره میکنیم