Re: Insert NULL for '' - Mailing list pgsql-general

From Tom Lane
Subject Re: Insert NULL for ''
Date
Msg-id 828.1055516386@sss.pgh.pa.us
Whole thread Raw
In response to Re: Insert NULL for ''  (Jonathan Bartlett <johnnyb@eskimo.com>)
List pgsql-general
Jonathan Bartlett <johnnyb@eskimo.com> writes:
> Could you instead have a function around it?
> into foo (bar) values (myfunction(''))
> Where myfunction maps '' to null.

That would be an easy solution (one of many) if we could make any
changes in the SQL being emitted by the application, but I think
Daniel is saying that he doesn't want to touch the application at all.

            regards, tom lane

pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: tsearch - v2 new dict
Next
From: Alexander Mueller
Date:
Subject: Table name specified more than once