Skip site navigation (1) Skip section navigation (2)

Re: Boolean casting in 7.3 -> changed?

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "David Walker" <pgsql(at)grax(dot)com>,"David Wheeler" <david(at)wheeler(dot)net>
Cc: "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Boolean casting in 7.3 -> changed?
Date: 2002-11-30 21:01:39
Message-ID: 0b8e01c298b3$ae62e580$6500a8c0@internal (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> I didn't see an answer to this question, but I sincerely hope that the
> answer is
> "no." Otherwise, dynamic interfaces are going to have a much harder
> time.
> Take DBI (and DBD::Pg), for example. Most DBI users don't specify a
> data type when using placeholders. Therefore, DBD::Pg (and other DBDs,
> including DBD::Oracle) assume that the data types are strings. So it's
> not unusual for DBD::Pg to execute a query like this:
>    INSERT INTO foo (numtype, varchartype, datetime, inttype)
>         VALUES ('23.4', 'string', '2002-11-30 00:00:00', '12');
> In order to allow the flexibility to remain, AFAICT PostgreSQL has to
> continue to allow strings to be converted to numbers on the back end.

I have to agree with david on this one.  It's essential that quoted numbers
be allowed into number fields.  I have no problem with putting numbers in
boolean fields though.


In response to

pgsql-hackers by date

Next:From: Joe ConwayDate: 2002-11-30 21:11:20
Subject: Re: [GENERAL] One SQL to access two databases.
Previous:From: David WheelerDate: 2002-11-30 20:51:14
Subject: Re: ANNOUNCE: DBD::Pg 1.20

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group