Re: [Fwd: Re: Using char fields with 7.1.3 driver] - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: [Fwd: Re: Using char fields with 7.1.3 driver]
Date
Msg-id 20102.999830627@sss.pgh.pa.us
Whole thread Raw
In response to [Fwd: Re: Using char fields with 7.1.3 driver]  (<jeffdavey@submersion.com>)
List pgsql-jdbc
<jeffdavey@submersion.com> writes:
> Just I usually prefer using fixed field lengths as queries tend to be
> significantly faster. Also, you can use them in indexes.

You are making assumptions based on other databases that are not
relevant to Postgres.

> And it leads me to wonder how you would represent an ending  "space" in a
> field,

In varchar or text fields, trailing spaces are real data.  In
fixed-width char fields, trailing spaces are pads.  AFAIK this is
consistent with the SQL92 specification.

            regards, tom lane

pgsql-jdbc by date:

Previous
From:
Date:
Subject: Re: Using char fields with 7.1.3 driver]
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] JDBC pg_description update needed for CVS tip