Re: Cast null to int4 upgrading from Version 7.2

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, Jim Nasby <decibel(at)decibel(dot)org>
Cc: Neil Conway <neilc(at)samurai(dot)com>, demmons(at)instantbenefits(dot)com, 'Jason Rutherford' <jasonr(at)instantbenefits(dot)com>, Dave Horn <dhorn(at)instantbenefits(dot)com>
Subject: Re: Cast null to int4 upgrading from Version 7.2
Date: 2006-11-17 06:21:59
Message-ID: 200611170722.00942.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Jim Nasby wrote:
> As a less invasive alternative, I *think* you could create an SQL
> function for casting text to int that treated '' as 0, and then
> replace the built-in CAST with that.

Won't work. You need to replace the data type input function.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2006-11-17 07:27:39 Re: [PATCHES] replication docs: split single vs.
Previous Message Peter Eisentraut 2006-11-17 06:21:05 Re: ALTER TABLE RENAME column

Browse pgsql-patches by date

  From Date Subject
Next Message Hannu Krosing 2006-11-17 07:27:39 Re: [PATCHES] replication docs: split single vs.
Previous Message Bruce Momjian 2006-11-17 05:01:06 Re: [PATCHES] replication docs: split single vs. multi-master