
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:
http://github.com/sam/do/tree/ma...
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
-
-
Sam Smoot May 8th, 2008 @ 05:22 PM
- Assigned user set to Scott Bauer
Grr... LH.
Scott, PDI. I think you said you already handled this. If so, please mark as resolved.
-
Scott Bauer May 8th, 2008 @ 06:54 PM
- State changed from new to resolved
Fixed.
See http://github.com/sam/do/commit/... for details.
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »