HOWTO pass "default value" to PQexecParams ?

From: JiangWei <jw(dot)pgsql(at)sduept(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: HOWTO pass "default value" to PQexecParams ?
Date: 2006-01-06 01:16:31
Message-ID: 43BDC4EF.7090408@sduept.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

-- SQL Script

Create Table test (
id int4 not null,
name text default '<noname>'
);

-- C

PQexec (conn, "INSERT INTO test(id, name) VALUES (100,default)" ); // OK.

PQexecParams (conn, "INSERT INTO test(id, name) VALUES ($1, $2)" ); //
$1=100, $2= ????

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message JiangWei 2006-01-06 01:32:36 [C API] Is there a nice way to get table/column name on some error ?
Previous Message Volkan YAZICI 2006-01-02 14:49:15 Re: Convertion of date/time binary format to text format