From: <to...@tu...> - 2011-04-12 13:00:00
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, Apr 12, 2011 at 08:50:35AM -0400, Kevin Kenny wrote: > On 04/12/2011 02:05 AM, to...@tu... wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On Mon, Apr 11, 2011 at 10:48:09PM -0400, Kevin Kenny wrote: >>> On 04/11/2011 02:48 AM, to...@tu... wrote: >>>> What happens is that PostgreSQL sets the type of the parameter to >>>> "unspecified" [...] >> >>> Can you give me the schema for the 'besitzer' table? >> >> Yes, sorry. Here it is: >> >> CREATE TABLE besitzer ( >> id SERIAL PRIMARY KEY, >> b_name VARCHAR >> ); >> >> ...just cut down to bare minimum (it's wht I used in preparing this >> example, though)- > > This is feeling more and more like a PostgreSQL bug. Here is what I'm > doing from the command line, and I'm not seeing your issue. Are you > doing something different? I guess the difference is in the PostgreSQL version. I took the question to the PostgreSQL general mailing list, in any case (I'd have to install a newer PostgreSQL here to check my guess and are a bit tight on time the next couple of days, but I'll do eventually, for sure). > $ psql tdbc_test > psql (8.4.7) > Type "help" for help. > > tdbc_test=# create table example(id serial primary key, name varchar); > NOTICE: CREATE TABLE will create implicit sequence "example_id_seq" for > serial column "example.id" > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index > "example_pkey" for table "example" > CREATE TABLE > tdbc_test=# prepare foo as select id, name from example where name = $1; > PREPARE > tdbc_test=# insert into example(name) values('fred'); > INSERT 0 1 > tdbc_test=# execute foo('fred'); > id | name > ----+------ > 1 | fred > (1 row) > > tdbc_test=# drop table example; > DROP TABLE > tdbc_test=# \q No, that's exactly the example which fails on my version (8.4.5). Since it's reproducible with psql alone and no tdbc, I'd say it's a missing entry in pg_cast which got added between 8.4.5 and 8.4.7. Tdbc is innocent :-) Thanks, and I'll report back any insights. Regards - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFNpFHiBcgs9XrR2kYRApg/AJ46Cjxi8D8KuOq8RuymQUGxwkRRdACcCLe6 RePbE/bUCQgiM4dsmOtvBnE= =24XX -----END PGP SIGNATURE----- |