#244 ✓resolved
Dan Kubb (dkubb)

do_postgres typecasting empty String to nil

Reported by Dan Kubb (dkubb) | May 4th, 2008 @ 02:05 AM

Currently do_postgres is casting all empty string results to nil. I believe this is happening here in the typecast function:


The problem with this is that I have a case where I need to know if the column actually was NULL, or contained an empty string.

After looking over the postgres docs, it appears as if they have a PQgetisnull function that can be used to see if a field is actually NULL or contains some value. I think this should be used before the typecast method so that empty string results can be differentiated from NULL results.

When this ticket is resolved please uncomment the following spec:


Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket