Re: One byte integer support - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: One byte integer support
Date
Msg-id Pine.BSO.4.56.0501071548420.30405@leary.csoft.net
Whole thread Raw
In response to Re: One byte integer support  (Keith Hankin <keith105@yahoo.com>)
List pgsql-jdbc

On Fri, 7 Jan 2005, Keith Hankin wrote:

> But Postgres 'char' is just an alias for 'character',

Note that I did not say char.  I said "char".

db=# create table t (a char, b "char");
CREATE TABLE
db=# \d t
         Table "public.t"
 Column |     Type     | Modifiers
--------+--------------+-----------
 a      | character(1) |
 b      | "char"       |



> I don't understand why Postgres doesn't have a single-byte int support.
>

Postgresql's extensible type system allows users to create any number of
their own types.  One drawback of this flexibility is that it makes it
difficult to interpret what type a raw number is.  What type is 37? int2,
int4, int8?  Up until recently there were significant problems that
occurred if you got this wrong and people aren't rushing to add new types
that could resurrect those unhappy times.  This is also why postgresql
does not have unsigned types.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Keith Hankin
Date:
Subject: Re: One byte integer support
Next
From: "Julie Cottin"
Date:
Subject: Driver Information-PostgreSQL 8