Skip site navigation (1) Skip section navigation (2)

Re: BUG #3428: plperl spi_exec_prepared char length always unity

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matt Taylor <matt(at)lindenelevator(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3428: plperl spi_exec_prepared char length always unity
Date: 2007-07-05 17:45:10
Message-ID: 19328.1183657510@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Matt Taylor <matt(at)lindenelevator(dot)com> writes:
> On Thu, 2007-07-05 at 00:13 -0400, Tom Lane wrote:
>> IIRC, "char" means "char(1)" by default, so I'm unconvinced that this
>> behavior is a bug.

> Since 'character' is not accepted as a valid type by spi_prepare, is
> this bug a duplicate of BUG #2917?  Maybe I am just doing this wrong,
> the documentation is sparse.

Oh, duh, I should have thought harder.  Yeah, in 8.2 you will get the
internal 1-byte-char datatype, not bpchar which is what spi_prepare
will interpret this as meaning in 8.3 and beyond.

I'd suggest using "bpchar", or maybe better "varchar" (do you actually
want fixed-width char type??) for the time being.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Larry RosenmanDate: 2007-07-05 20:22:17
Subject: Re: BUG #3429: table named MULTIPOLYGON
Previous:From: James WhiteDate: 2007-07-05 17:19:48
Subject: BUG #3429: table named MULTIPOLYGON

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group