检查PostgreSQL中的表中是否存在坐标

检查PostgreSQL中的表中是否存在坐标,postgresql,Postgresql,下面是我的表模式和数据 #Table Structure CREATE TABLE public.route ( name text NOT NULL, startpoint point NOT NULL, endpoint point NOT NULL, id integer NOT NULL DEFAULT nextval('route_id_seq'::regclass), CONSTRAINT route_pkey PRIMARY KEY (id) ) WITH (

下面是我的表模式和数据

#Table Structure 
CREATE TABLE public.route
(
  name text NOT NULL,
  startpoint point NOT NULL,
  endpoint point NOT NULL,
  id integer NOT NULL DEFAULT nextval('route_id_seq'::regclass),
  CONSTRAINT route_pkey PRIMARY KEY (id)
)
WITH (
 OIDS=FALSE
);

#Table Data
INSERT INTO public.route (name, startpoint, endpoint, id) VALUES ('Atlantic',     (-73.848838,40.688299), (-73.824869,40.694831), 1);
INSERT INTO public.route (name, startpoint, endpoint, id) VALUES ('Guy Brewer', (-73.7991,40.708257), (-73.78543,40.688334), 2);
要检查列
起始点
是否在
路由
表中有点
(-73.848838,40.688299)

SELECT *
FROM route
WHERE startpoint ~= POINT '(-73.848838,40.688299)';
您可以通过一个要点索引来加快速度:

CREATE INDEX ON route USING gist (startpoint);

问题是什么?我需要一个查询来检查表的列
起始点
中是否存在点
(-73.848838,40.688299)