pablo_tweek@yahoo.com (Pablo S) writes:
> Hi all, I have search high and low on this -
> Take for instance the statement :
>
> insert into foo (text1, text2, int1) values ('Foo', 'Bar', '');
Have a look at nullif();
create table foo (a int)
;
insert into foo
values (nullif('$varWhichMayBeEmptyString', '')::int)
;
As I recall, there is a comment in the release notes somewhere between
your PG version and the current one, that int cols no longer take
empty string as NULL.
HTH
--
-------------------------------------------------------------------------------
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobile http://www.JerrySievers.com/