Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A79CD632B58 for ; Sat, 24 Oct 2009 06:29:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 78190-01 for ; Sat, 24 Oct 2009 09:29:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from cirrus.hsolutions.ch (cirrus.hsolutions.ch [212.203.66.103]) by mail.postgresql.org (Postfix) with ESMTP id F294A632C9A for ; Sat, 24 Oct 2009 06:29:14 -0300 (ADT) Received: from [192.168.32.120] (unknown [78.234.64.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by cirrus.hsolutions.ch (Postfix) with ESMTPSA id BD12B790001; Sat, 24 Oct 2009 11:34:08 +0200 (CEST) Message-ID: <4AE2C8E3.8000906@hsolutions.ch> Date: Sat, 24 Oct 2009 11:29:07 +0200 From: Denis BUCHER Organization: Horus Digital Solutions =?ISO-8859-1?Q?S=E0rl?= User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tom Lane CC: pgsql-sql@postgresql.org Subject: Re: Problem with return type of function ??? (corrected) References: <4AE046E4.8010205@hsolutions.ch> <29935.1256222015@sss.pgh.pa.us> <4AE07708.7020506@hsolutions.ch> <1268.1256226694@sss.pgh.pa.us> In-Reply-To: <1268.1256226694@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.537 tagged_above=-10 required=5 tests=AWL=0.062, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/123 X-Sequence-Number: 33322 Tom Lane a écrit : > Denis BUCHER writes: >> To do this it will be a little complicated because of table >> dependencies... And it could bug again at the next DROP COLUMN... Is >> there a way to change my function (RETURN SETOF part) to specify the >> column names/types ? > > No, not really. You could maybe un-drop the columns with some manual > surgery on pg_attribute, but it doesn't seem like that's going to lead > to a nice solution. > > If you were really desperate you could try back-porting the patch: > http://archives.postgresql.org/pgsql-committers/2009-08/msg00068.php > but I wouldn't want to vouch for its safety, considering it hasn't > been through a beta test cycle yet. Finally there was no real dependencies of that table, and I've found out that the "dependency" was my function ! Using SETOF (table) makes impossible to DROP the table. Therefore I DROP my function and was able to follow you advice, and it worked perfectly ! Thanks a lot for your help (as well as Richard's) Denis