From: Rich Shepard <rshepard@appl-ecosys.com>
To: pgsql-general@postgresql.org
Subject: Re: Blank, nullable date column rejected by psql
Date: Tue, 12 Feb 2019 05:42:56 -0800 (PST)
Message-ID: <alpine.LNX.2.20.1902120538510.15295@salmo.appl-ecosys.com> (raw)
In-Reply-To: <7ad1d0b443c12a1a6ea11606221b7201e933148f.camel@cybertec.at>
References: <alpine.LNX.2.20.1902111434330.28800@salmo.appl-ecosys.com>
<7ad1d0b443c12a1a6ea11606221b7201e933148f.camel@cybertec.at>
On Tue, 12 Feb 2019, Laurenz Albe wrote:
> If you insert a string into a "date" column, PostgreSQL will try to
> convert the string to a date with the type input function. The type input
> function fails on an empty string, since it cannot parse it into a valid
> "date" value. This also applies to the empty string.
Laurenz,
All my previous databases with date columns were required to have an entry
because each row contatined spatio-temporal sampling data. The table in this
business-oriented application is not required to have a next_contact date
and (the crucial point) is that I conflated date values with string values.
As you wrote, a date column is converted from the entered string to a
non-string date type and requires an explicit null when there is no value to
be stored for that column.
Thanks very much,
Rich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: rshepard@appl-ecosys.com
Subject: Re: Blank, nullable date column rejected by psql
In-Reply-To: <alpine.LNX.2.20.1902120538510.15295@salmo.appl-ecosys.com>
References: <alpine.LNX.2.20.1902111434330.28800@salmo.appl-ecosys.com> <7ad1d0b443c12a1a6ea11606221b7201e933148f.camel@cybertec.at> <alpine.LNX.2.20.1902120538510.15295@salmo.appl-ecosys.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox