X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id E9CD19DCA82 for ; Fri, 20 Jan 2006 13:07:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11248-01-4 for ; Fri, 20 Jan 2006 13:07:08 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 9F4B79DCAD2 for ; Fri, 20 Jan 2006 13:07:07 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k0KH77vp025011; Fri, 20 Jan 2006 12:07:07 -0500 (EST) To: "Scott Schulthess" cc: pgsql-admin@postgresql.org Subject: Re: Returning setof records In-reply-to: <4BF377919225F449BB097CB76FFE9BC83DD7F0@ptolemy.topozone.com> References: <4BF377919225F449BB097CB76FFE9BC83DD7F0@ptolemy.topozone.com> Comments: In-reply-to "Scott Schulthess" message dated "Fri, 20 Jan 2006 11:43:24 -0500" Date: Fri, 20 Jan 2006 12:07:07 -0500 Message-ID: <25010.1137776827@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.094 required=5 tests=[AWL=0.094] X-Spam-Score: 0.094 X-Spam-Level: X-Archive-Number: 200601/242 X-Sequence-Number: 20330 "Scott Schulthess" writes: > :( 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. [ looks again... ] Oh, wait, you're getting caught by a standard plpgsql gotcha: > create function placenamesearch(place text, state integer, county text, ^^^^^ > FOR myview IN SELECT featurename, countyname, state, featuretype, ^^^^^ plpgsql variable names win out over table column names, so what's coming back in the SELECT result's third column is the integer "state" parameter. regards, tom lane