inet/cidr data types - Mailing list pgsql-general

From Russell Aspinwall
Subject inet/cidr data types
Date
Msg-id 3DCBAB81.66B7ED11@flomerics.co.uk
Whole thread Raw
Responses Re: inet/cidr data types  (Vince Vielhaber <vev@michvhf.com>)
Re: inet/cidr data types  (Tino Wildenhain <tino@wildenhain.de>)
List pgsql-general
Hi,

I need to store 2GB of accumulated data into a database. I have built
v7.2.3 with Java, Tcl/Tk, Perl, C++ language extensions. I have written
nawk scripts to convert csv data into the appropiate INSERT INTO
commands, then adding the data is a simple matter of running psql -d
<database> -f date.psql

Some of the fields are of type inet or cidr , however these fields do
not always contain a value. I need to be able to set the field to null
in my INSERT INTO command the empty values are represented by ''.
However during the INSERT command, the command can fail with a message
like. I would like to be able to queries on these fields but
automatically exclude the null values.

psql:test.psql:1: ERROR:  invalid CIDR value ''

Any help would be appreciated.

Russell

pgsql-general by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: indexes on varchar fields
Next
From: Peter Nixon
Date:
Subject: Re: indexes on varchar fields