Default and PQexecParams

Started by Jerry LeVanover 20 years ago2 messagesgeneral
Jump to latest
#1Jerry LeVan
jerry.levan@eku.edu

Hi,

How could one differentiate between DEFAULT and 'DEFAULT' as parameters
to PQexecuteParams?

Jerry

#2ljb
ljb220@mindspring.com
In reply to: Jerry LeVan (#1)
Re: Default and PQexecParams

jerry.levan@eku.edu wrote:

Hi,

How could one differentiate between DEFAULT and 'DEFAULT' as parameters
to PQexecuteParams?

I assume you mean the libpq function PQexecParams(), and you want to use a
parameterized query for INSERT or UPDATE.

I don't think it is possible to use DEFAULT because it is a keyword,
and only a value expression will work as a parameter.

With NULL vs 'NULL', PQexecParams() has a special case to handle NULL
(null pointer in the paramValues array).