- $sSQL = "insert into placex (osm_type,osm_id,class,type,postcode,calculated_country_code,geometry) ";
- $sSQL .= "select 'P',nextval('seq_postcodes'),'place','postcode',postcode,'us',";
- $sSQL .= "ST_SetSRID(ST_Point(x,y),4326) as geometry from us_postcode";
- if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection));
+ if (CONST_Use_Extra_US_Postcodes)
+ {
+ $sSQL = "insert into placex (osm_type,osm_id,class,type,postcode,calculated_country_code,geometry) ";
+ $sSQL .= "select 'P',nextval('seq_postcodes'),'place','postcode',postcode,'us',";
+ $sSQL .= "ST_SetSRID(ST_Point(x,y),4326) as geometry from us_postcode";
+ if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection));
+ }