|
From: Kevin K. <kk...@ny...> - 2011-04-12 12:50:42
|
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?
$ 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
--
73 de ke9tv/2, Kevin
|