Re: CHAR vs TEXT args

From: Dennis Gearon <gearond(at)fireserve(dot)net>
To: David Shadovitz <david_shadovitz(at)xontech(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CHAR vs TEXT args
Date: 2003-08-28 13:56:46
Message-ID: 3F4E0A1E.6050500@fireserve.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Shadovitz wrote:

>I've created two PL/pgSQL functions with the same name and different
>signatures:
>
>CREATE FUNCTION ABC(CHAR) ...
>CREATE FUNCTION ABC(TEXT) ....
>
>I intended to call the CHAR-signature function like this:
>SELECT ABC('R');
>
>And the TEXT-signature function like this:
>SELECT ABC('Right');
>
>But I found that both calls invoke the TEXT-signature function.
>

maybe you need to do this:

SELECT ABC('R':TEXT);
SELECT ABC('Right':CHAR);

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-08-28 13:58:32 Re: Books for PostgreSQL?
Previous Message Chris Webster 2003-08-28 13:55:29 Re: Books for PostgreSQL?