pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: JiangWei <jw.pgsql@sduept.com>
To: pgsql-interfaces@postgresql.org
Subject: HOWTO pass "default value" to PQexecParams ?
Date: Fri, 06 Jan 2006 09:16:31 +0800
Message-ID: <43BDC4EF.7090408@sduept.com> (raw)

-- 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= ????



view thread (5+ messages)  latest in thread

Message-ID: <43BDC4EF.7090408@sduept.com>
Permalink:  ../43BDC4EF.7090408@sduept.com/
Also on:    postgresql.org/message-id/43BDC4EF.7090408@sduept.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: jw.pgsql@sduept.com
  Subject: Re: HOWTO pass "default value" to PQexecParams ?
  In-Reply-To: <43BDC4EF.7090408@sduept.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox