I have two tables in my PostgreSQL 9.5 database i.e., roads and polygons. The sample scenarios are as:
In PostGIS, for each road how can I detect whether polygons are one side of the road center line or on both sides?
There is a new single-sided buffer option in Postgis. However, this is currently only available in trunk so you will either have to build from source or download a nightly / experimental build. It should be generally available as of the 2.5 release when that appears. See this man page.