CHAR vs TEXT args - Mailing list pgsql-general

From david_shadovitz@xontech.com (David Shadovitz)
Subject CHAR vs TEXT args
Date
Msg-id 8b37e2e5.0308270908.bb390df@posting.google.com
Whole thread Raw
Responses Re: CHAR vs TEXT args  (Joe Conway <mail@joeconway.com>)
Re: CHAR vs TEXT args  (Dennis Gearon <gearond@fireserve.net>)
List pgsql-general
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.  So is
there any distinction between CHAR and TEXT?  Can I somehow specify
that the argument 'R' is to be treated as a CHAR, so the
CHAR-signature version of ABC is executed?

Thanks.
-David

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: The ..... worm
Next
From: "Kuldeep Tanna"
Date:
Subject: Problem compiling tablefunc module in contributions