Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B2D4D2E3F88 for ; Tue, 5 Feb 2008 17:40:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 89102-08 for ; Tue, 5 Feb 2008 17:40:00 -0400 (AST) Received: from mailserver.ttmail.com (unknown [88.255.235.9]) by postgresql.org (Postfix) with ESMTP id 0EAAE2E3F41 for ; Tue, 5 Feb 2008 17:39:58 -0400 (AST) Received: from STT1EXF04.TTHMC.LOCAL ([192.168.19.139]) by mailserver.ttmail.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 5 Feb 2008 23:39:43 +0200 Received: from alamut ([88.227.53.130]) by STT1EXF04.TTHMC.LOCAL with Microsoft SMTPSVC(6.0.3790.1830); Tue, 5 Feb 2008 23:39:43 +0200 Received: from (unknown [88.227.53.130]) by AVGW-TTMAIL-3.ttmail.com with smtp id 6e8c_da82b8fa_d432_11dc_baae_001422175f4f; Tue, 05 Feb 2008 23:39:42 +0200 To: Franklin Haut Cc: pgsql-sql@postgresql.org Subject: Re: Cast in PG 8.3 References: <47A8B788.6010304@gmail.com> From: Volkan YAZICI Date: Wed, 06 Feb 2008 00:39:39 +0200 In-Reply-To: <47A8B788.6010304@gmail.com> (Franklin Haut's message of "Tue\, 05 Feb 2008 16\:22\:48 -0300") Message-ID: <87d4rbm3is.fsf@ttmail.com> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Rules: 2 Rules triggered BAYES_00=-2.5, HAS_X_HELO=0 X-OriginalArrivalTime: 05 Feb 2008 21:39:43.0344 (UTC) FILETIME=[9E9DF700:01C8683F] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.101 tagged_above=0 required=5 tests=BAYES_50=0.001, RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200802/26 X-Sequence-Number: 30117 Franklin Haut writes: > I Tries create a cast but the function text doesn't exist more in PG 8.3 sql-createcast.html tells that "It is normally not necessary to create casts between user-defined types and the standard string types (text, varchar, and char(n)). PostgreSQL will automatically handle a cast to a string type by invoking the other type's output function, ..." Therefore, this might help you: test=# SELECT typoutput FROM pg_type WHERE typname = 'int4'; typoutput ----------- int4out (1 row) Regards.