Tom - I've also tried this select * from placenamesearch('Cheshire',9,'New Haven','','') as (FeatureName varchar, CountyName varchar, State char, Cellname varchar, Elevation int4, PrimaryLatDD float8, PrimaryLonDD float8); ERROR: wrong record type supplied in RETURN NEXT
:( I realize it often automatically converts, and I've tried using varchar and char for the state column, as well as int4, integer, and int for the other columns. -Scott -----Original Message----- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 11:39 AM To: Scott Schulthess Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Returning setof records "Scott Schulthess" <[EMAIL PROTECTED]> writes: > select * from placenamesearch('Cheshire',9,'New Haven','text', 'text') > as (FeatureName varchar, CountyName varchar, State varchar, featuretype > varchar, Elevation int4,CellName varchar, PrimaryLatDD float8, > PrimaryLonDD float8); ... > state char(2), You've got the State output column declared as varchar, but actually it's char. PG will often do automatic conversion from one type to the other, but in this context it's picky... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match