Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 72688632451 for ; Sat, 6 Mar 2010 07:30:11 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 55177-02 for ; Sat, 6 Mar 2010 11:30:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f214.google.com (mail-gx0-f214.google.com [209.85.217.214]) by mail.postgresql.org (Postfix) with ESMTP id D1087633A3A for ; Sat, 6 Mar 2010 07:30:00 -0400 (AST) Received: by gxk6 with SMTP id 6so2226898gxk.14 for ; Sat, 06 Mar 2010 03:29:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.90.242.10 with SMTP id p10mr2082220agh.56.1267874552306; Sat, 06 Mar 2010 03:22:32 -0800 (PST) In-Reply-To: <4B9236A8.3070603@gmail.com> References: <4B9236A8.3070603@gmail.com> From: Nilesh Govindarajan Date: Sat, 6 Mar 2010 16:52:12 +0530 Message-ID: Subject: Re: Check type compatibility To: Gianvito Pio Cc: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=0016e647f0384f5fe40481200c96 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/40 X-Sequence-Number: 33747 --0016e647f0384f5fe40481200c96 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Mar 6, 2010 at 4:34 PM, Gianvito Pio wrote: > Hi all, > is there a way to check if two attribute are type compatible (for example > integer and serial, integer and integer, character varying and text, etc..)? > > Example: > IF (compatible (table1.att1, table2.att2)) THEN > ... > ELSE > ... > END IF; > > Thanks > > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql > Explain in more detail. -- Nilesh Govindarajan Site & Server Administrator www.itech7.com --0016e647f0384f5fe40481200c96 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Sat, Mar 6, 2010 at 4:34 PM, Gianvito Pio <pio.gianvito@g= mail.com> wrote:
Hi all,
is there a way to check if two attribute are type compatible (for example i= nteger and serial, integer and integer, character varying and text, etc..)?=

Example:
IF (compatible (table1.att1, table2.att2)) THEN
=A0 =A0 =A0 =A0...
ELSE
=A0 =A0 =A0 =A0...
END IF;

Thanks


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
= http://www.postgresql.org/mailpref/pgsql-sql

Explain in more detail.

= --
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

--0016e647f0384f5fe40481200c96--