libpq: NULL in binary parameters

From: john heasley <heas(at)shrubbery(dot)net>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: libpq: NULL in binary parameters
Date: 2007-05-17 16:48:00
Message-ID: 20070517164800.GA27857@shrubbery.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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?

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Andrew McNamara 2007-05-17 23:11:39 Re: libpq: NULL in binary parameters
Previous Message Michael Fuhr 2007-05-17 12:10:42 Re: COPY command with bad input