pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: john heasley <heas@shrubbery.net>
To: pgsql-interfaces@postgresql.org
Subject: libpq: NULL in binary parameters
Date: Thu, 17 May 2007 09:48:00 -0700
Message-ID: <20070517164800.GA27857@shrubbery.net> (raw)

Using binary parameters with libpq (PQexecParams) I am having trouble
figuring out how NULL is represented since there does not appear to be
a NULLOID.

For example, if a table has a varchar column and it IS NULL for a given
row, then what I received is a zero-length string ("").  Also, while I
can insert a NULL varchar simply by setting the value to NULL (or 0), it
is not clear how to acheive this with say an integer column.  And, is it
possible to match NULL using a parameter.

I suspect this boils down to, how is NULL represented as a binary parameter?

clues?



view thread (2+ messages)  latest in thread

Message-ID: <20070517164800.GA27857@shrubbery.net>
Permalink:  ../20070517164800.GA27857@shrubbery.net/
Also on:    postgresql.org/message-id/20070517164800.GA27857@shrubbery.net

 · 

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: heas@shrubbery.net
  Subject: Re: libpq: NULL in binary parameters
  In-Reply-To: <20070517164800.GA27857@shrubbery.net>

* 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