"Dave Lee" <[EMAIL PROTECTED]> writes:
> I've read src/backend/utils/fmgr/README and it states that returning
> NULL is just a matter of setting isnull to true in the
> FunctionCallInfo struct, and provides a convenience macro,
> PG_RETURN_NULL. But then, in InputFunctionCall, I presume you're
> re
On Wed, Jun 18, 2008 at 3:25 PM, Tom Lane <[EMAIL PROTECTED]> wrote:
> There isn't any really nice way to do that :-(. You could put a wrapper
> function around int4in but it would not help, because the internal API
> for datatype input functions doesn't support having them return NULL
> (see Inpu
"Dave Lee" <[EMAIL PROTECTED]> writes:
> I see. Other than directly modifying int4in (is this the one?), is
> there a way to plug-in our modified empty string handling logic? I'm
> picturing a scenario where we write write a wrapper function that
> tests for empty strings and returns NULL, else jus
On Wed, Jun 18, 2008 at 12:39 PM, Tom Lane <[EMAIL PROTECTED]> wrote:
> None. There is no type coercion there --- what that is really
> specifying is invocation of the int data type's input function
> on the given string.
I thought that something like this may be this was the case.
> I don't thi
"Dave Lee" <[EMAIL PROTECTED]> writes:
> and I notice that there isn't any rows specified for converting
> varchar or text to int. Which raises the question, if I run:
> SELECT '123'::int;
> What conversion is actually happening here?
None. There is no type coercion there --- what that is reall
Hi,
We have an existing (PHP) code base that is being converted to use
PostgreSQL from MySQL. In most places, our insert and update
statements are formed using single quoted values, and when there is no
value, the empty string is being passed in. PostgreSQL objects to
empty strings for certain col