From: Tom Lane <tgl@sss.pgh.pa.us>
To: Skylar Hawk <skylar.j.hawk@gmail.com>
Cc: pgsql-bugs@postgreSQL.org
Subject: Re: BUG #6020: Wrong data type returned after CAST in FROM
Date: Wed, 11 May 2011 13:40:10 -0400
Message-ID: <1750.1305135610@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTikRSTUL3APteP3jAVe2_Y=NvpPqXw@mail.gmail.com>
References: <201105102236.p4AMaW5e038211@wwwmaster.postgresql.org>
<570.1305133499@sss.pgh.pa.us>
<BANLkTikRSTUL3APteP3jAVe2_Y=NvpPqXw@mail.gmail.com>
Skylar Hawk <skylar.j.hawk@gmail.com> writes:
> I got the similar results when I ran similar queries from a ruby
> script using the 'postgres' gem as well, which notified me of the
> difference through the error message. That's actually what alerted me
> to it first. The script calls a plpsql function which expects a
> CHAR(8) and the script died. The database message said the function
> was expecting a CHAR(8) but got a BPCHAR instead.
OK, now I'm really unsure what you're talking about. There's no such
thing as a plpgsql function that "expects a char(8)" --- well, you can
declare it that way, but the database just ignores the length modifier.
And BPCHAR is just the internal name for CHAR(n), so it should certainly
have matched.
Could we see the *exact* function declaration, the exact SQL you issued,
and the exact error message, rather than ambiguous descriptions?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, skylar.j.hawk@gmail.com
Subject: Re: BUG #6020: Wrong data type returned after CAST in FROM
In-Reply-To: <1750.1305135610@sss.pgh.pa.us>
References: <201105102236.p4AMaW5e038211@wwwmaster.postgresql.org> <570.1305133499@sss.pgh.pa.us> <BANLkTikRSTUL3APteP3jAVe2_Y=NvpPqXw@mail.gmail.com> <1750.1305135610@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox