Re: Question about inserts - Mailing list pgsql-general

From Paul Thomas
Subject Re: Question about inserts
Date
Msg-id 20040423134410.A27748@bacon
Whole thread Raw
In response to Question about inserts  (mike <mike@redtux1.uklinux.net>)
List pgsql-general
On 23/04/2004 11:36 mike wrote:
> Is it possible to to the following
>
> I have tables which are updated via webpage (perl) with fields of type
> int and date (all nullable). If the values are blank the entire insert
> fails, with a wrong type error.
>
> Is there any way to stop this behaviour so that the valid information is
> allowed,but the blank values get ignored.


By blank, I assume you mean a zero-length string or the request parameter
being absent? I think you need to detect these conditions in your perl
program anf construct the SQL accordingly.

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for
Business             |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

pgsql-general by date:

Previous
From: "Stijn Vanroye"
Date:
Subject: Re: Question about inserts
Next
From: Bruno Wolff III
Date:
Subject: Re: Question about inserts