X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id ABD1252835 for ; Thu, 7 Jul 2005 21:58:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 36079-09 for ; Fri, 8 Jul 2005 00:58:33 +0000 (GMT) Received: from mail.ints.com (67.108.61.131.ptr.us.xo.net [67.108.61.131]) by svr1.postgresql.org (Postfix) with ESMTP id E7957529E5 for ; Thu, 7 Jul 2005 21:58:32 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.ints.com (Postfix) with ESMTP id 12E907ECB for ; Thu, 7 Jul 2005 17:58:36 -0700 (PDT) Received: from mail.ints.com ([127.0.0.1]) by localhost (mail [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04775-02 for ; Thu, 7 Jul 2005 17:58:29 -0700 (PDT) Message-ID: <42CDCFB4.2030908@ints.com> Date: Thu, 07 Jul 2005 17:58:28 -0700 From: Tim Jackson Organization: Integrated Services Inc. User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: C set return function differences on 8.0? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at ints.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200507/15 X-Sequence-Number: 5651 I have a C .so set return function which is called to create a views, pulling data from an older non SQL flat file data structure CREATE OR REPLACE VIEW view_name AS SELECT call_d.col_0, call_d.col_1, call_d.col_2, call_d.col_3" FROM call_d('select * from aname '::text, 'aname'::text) AS (col_0 bigint, col_2 numeric, col_2 text, col_3 text); The call_d function calls the C .so passing in the SQL and the target and returns a record set conforming to the request, the column names and data types are supplied for each target/view This worked compiled under postgresql 7.4 for all the target files and various data types that I have. I re-compiled the .so using 8.0 server development source and rebuilt the views on 8.0 and now only some views will pull up data. These are views using the same data that worked under 7.4 and now just abort. Some of the views do select. Could the problem be related to a difference in the way 8.0 is handling data types? When I define a column as numeric with out precision or scale it should handle any numeric value, however in a data set that has a numeric field with mostly XX.XX data one record had a XX.XXX value and once I removed that record from the set the view selected ok. This doesn't make sense to me.