# Postcodes in Nominatim
-The blog post [Nominatim and Postcodes](https://www.openstreetmap.org/user/lonvia/diary/43143)
+The blog post
+[Nominatim and Postcodes](https://www.openstreetmap.org/user/lonvia/diary/43143)
describes the handling implemented since Nominatim 3.1.
Postcode centroids (aka 'calculated postcodes') are generated by looking at all
In the Nominatim database run
```sql
-SELECT osm_type, osm_id, class, type,
- st_x(centroid) as lon, st_y(centroid) at lat
+SELECT address->'postcode' as pc,
+ osm_type, osm_id, class, type,
+ st_x(centroid) as lon, st_y(centroid) as lat
FROM placex
WHERE country_code='fr'
AND upper(trim (both ' ' from address->'postcode')) = '33210';