Pprint_Addy — 给定一个 norm_addy
复合类型对象,返回其美观的打印表示形式。通常与 normalize_address 结合使用。
varchar pprint_addy(
norm_addy in_addy)
;
美观打印单个地址
SELECT pprint_addy(normalize_address('202 East Fremont Street, Las Vegas, Nevada 89101')) As pretty_address; pretty_address --------------------------------------- 202 E Fremont St, Las Vegas, NV 89101
美观打印地址表
SELECT address As orig, pprint_addy(normalize_address(address)) As pretty_address FROM addresses_to_geocode; orig | pretty_address -----------------------------------------------------+------------------------------------------- 529 Main Street, Boston MA, 02129 | 529 Main St, Boston MA, 02129 77 Massachusetts Avenue, Cambridge, MA 02139 | 77 Massachusetts Ave, Cambridge, MA 02139 28 Capen Street, Medford, MA | 28 Capen St, Medford, MA 124 Mount Auburn St, Cambridge, Massachusetts 02138 | 124 Mount Auburn St, Cambridge, MA 02138 950 Main Street, Worcester, MA 01610 | 950 Main St, Worcester, MA 01610