Dear All,

I am trying to implement a Identify Feature component in a map.
I have the map layers as tables in the postgres DB.It has a table called india_state with various columns like oid,country, state,tot_pop01 etc.Only 1 geometry column "the_geom". The database is built as per the POstgis template.

Now I need to compare the geometry i.e lonlat where the user has clicked with the "the_geom" column of the every row in the india_state table.
For this I am using,
select ST_Intersects((select the_geom from india_state where oid='12'), (select ST_GeomFromText('POINT(87.698046875 23.394140625)',4326)));
Now this query is returning true but I need either the oid or the_geom column value.
How can I get that?

Alternatively what could be the query so that I get either oid or the geom for the one for which the above query returns true after comparing with all the oid's i.e rows.

Thanks for ur replies.