inet/cidr data types

From: Russell Aspinwall <russell(dot)aspinwall(at)flomerics(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: inet/cidr data types
Date: 2002-11-08 12:18:09
Message-ID: 3DCBAB81.66B7ED11@flomerics.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Nixon 2002-11-08 12:27:38 Re: indexes on varchar fields
Previous Message Nigel J. Andrews 2002-11-08 12:03:09 Re: indexes on varchar fields