I have uploaded PostGIS/PostgreSQL tables to GeoServer and now need to create SLD style to draw points with a name of locations.

The problem is that point coordinates are in one table, and the name of the location is in another.

There is a common column in both tables, in form of PK>FK. I couldn't find a solution for taking, let say, an external label in SLD. I can't merge this two tables into one and would like to avoid using views in the database for that.

  • 1
    As far as I know there is no way to create join in Geoserver. In such cases you need to use view
    – Jendrusk
    Commented Nov 24, 2016 at 6:18

1 Answer 1


You can simply create a view in the database that joins the two tables (create view myjoin as select ....) or, if you don't have the necessary rights, build a sql-view in GeoServer to do the same

  • Views in a database isn't an option because in some other things they can make things slower than they should be. Will have to look more at this sql-view, didn't know about it. Commented Nov 29, 2016 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.