Re: 0/1 vs true/false - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: 0/1 vs true/false
Date
Msg-id Pine.LNX.4.56.0307231714090.1649@krusty.credativ.de
Whole thread Raw
In response to Re: 0/1 vs true/false  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane writes:

> Note that the spec only really speaks to the question of what booleans
> look like when written as constants in SQL statements.  AFAICT it does
> not take a position on what representations are to be used when
> transferring data into or out of the database.  So using '0' or '1' as
> input to a boolean field is not contrary to spec, but merely outside
> the spec (and in fact we will accept those strings for boolean...)

The transfer into the database is regulated when you write the data into
the SQL statement (as you normally would).  Input through prepare/bind and
input is governed by the respective client interface (e.g., embedded SQL
language bindings, JDBC spec, ODBC spec).  If you use libpq or psql then
you're beyond all standards anyway.

--
Peter Eisentraut   peter_e@gmx.net

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Performance hit of foreign key constraints?
Next
From: "Claudio Lapidus"
Date:
Subject: 7.4dev or beta version