Re: Insert NULL for ''

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Daniel Gehrke <dgehrke(at)neusta(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: Insert NULL for ''
Date: 2003-06-13 14:20:48
Message-ID: 3EE9DDC0.7090402@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

> "Daniel Gehrke" <dgehrke(at)neusta(dot)de> writes:
>
>>Is there any possibility to get postgresql to insert NULL when I do "insert
>>into foo (bar) values ('')?

...

> I can think of a couple of possible approaches:
>
> * Define a view in which the corresponding column is actually text not
> date

...

> * Give up and make the column be actually type text.

What would be really neat is the ability of CREATE CAST to override
the default implementation and at the same time let the override call
the "base" implementation, if necessary.

Mike Mascari
mascarm(at)mascari(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2003-06-13 14:33:11 Re: [HACKERS] SAP and MySQL ... [and Benchmark]
Previous Message Roland Glenn McIntosh 2003-06-13 13:57:47 Re: How can I insert a UTF-8 character with psql?