pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mattis Jiderhamn <mattias@expertsystem.se>
To: pgsql-sql@postgresql.org
Subject: Cast '' (blank) to null date
Date: Fri, 20 Jul 2001 11:44:08 +0200
Message-ID: <9j8udq$fmo$1@news.tht.net> (raw)

Hi there everyone.
I'm trying to create a trigger so that, if I try to insert blank, that is
'', into a date field it will be converted to null so that I don't get
  ERROR:  Bad date external representation ''

I believe my ploblem is that I don't know the type of blank (''), and
therefore do not know what to cast from.
It seems it is not unknown.
Any other suggestions?

Thanks,
  Mattias Jiderhamn
  mattias@expertsystem.se





view thread (2+ messages)  latest in thread

Message-ID: <9j8udq$fmo$1@news.tht.net>
Permalink:  ../9j8udq$fmo$1@news.tht.net/
Also on:    postgresql.org/message-id/9j8udq$fmo$1@news.tht.net

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mattias@expertsystem.se
  Subject: Re: Cast '' (blank) to null date
  In-Reply-To: <9j8udq$fmo$1@news.tht.net>

* 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