[BUGS] PQexecPrepared - PostgreSQL 7.4.1

2004-04-20 Thread Theo Kramer
Hi I am having a problem with PQexecPrepared() as follows (derived from testlibpq3.c) PQexec(conn, "PREPARE S123_000 (text) AS SELECT * from test1 WHERE t = $1"); When invoking PQexecPrepared() I get the following message from the backend ERROR: prepared statement "S123_" does

Re: [BUGS] Record type and ROW type in pl/pgsql functions

2004-04-20 Thread Tom Lane
[EMAIL PROTECTED] writes: > declare > hosts_str mail_relayhosts%ROWTYPE; > ... > FOR hosts_str IN SELECT hosts from mail_relayhosts LOOP You would need SELECT * FROM here, if you're selecting the whole row. This is going to try to stuff "hosts" into the first column of the rowtype variable, which