Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id CC95FD33CC0 for ; Tue, 12 Jun 2012 21:47:14 -0300 (ADT) Received: from [76.14.161.106] (helo=newserver.jfcomputer.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Sebjr-00078t-0C for pgsql-sql@postgresql.org; Wed, 13 Jun 2012 00:47:13 +0000 Received: from localhost (unknown [127.0.0.1]) by newserver.jfcomputer.com (Postfix) with ESMTP id 534BB106A2 for ; Wed, 13 Jun 2012 00:46:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at site Received: from newserver.jfcomputer.com ([127.0.0.1]) by localhost (linux-jfp8.site [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JEX+qKGXfmuB for ; Tue, 12 Jun 2012 17:46:53 -0700 (PDT) Received: from [192.168.1.114] (unknown [192.168.1.254]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johnf@jfcomputer.com) by newserver.jfcomputer.com (Postfix) with ESMTPSA id CE1FB555A for ; Tue, 12 Jun 2012 17:46:53 -0700 (PDT) Message-ID: <4FD7E2FD.9020207@jfcomputer.com> Date: Tue, 12 Jun 2012 17:46:53 -0700 From: John Fabiani Reply-To: johnf@jfcomputer.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0 MIME-Version: 1.0 To: "pgsql-sql@postgresql.org" Subject: how to use schema with data type Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 76.14.161.106 (failed) X-Pg-Spam-Score: 0.8 (/) X-Archive-Number: 201206/31 X-Sequence-Number: 36685 I have tried to use a user defined data type I created within a schema. But I could not figure it out. CREATE OR REPLACE FUNCTION xchromasun._chromasun_totals(date) RETURNS SETOF xchromasun.weekly_mpr AS CREATE OR REPLACE FUNCTION xchromasun._chromasun_totals(date) RETURNS SETOF "xchromasun.weekly_mpr" AS I had to move the user defined data type to "public". Could someone explain how I might get that done - that is use a schema data type from a function. I'm using 8.4.x. Johnf