[postgis-users] CHAR data type

Obe, Regina robe.dnd at cityofboston.gov
Wed Mar 21 07:17:58 PDT 2007


This is not a postgis question.  You'll have better luck getting an
answer on one of the postgresql lists such as 
 
pgsql-novice at postgresql.org
pgsql-general at postgresql.org

________________________________

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Leticia
Sent: Wednesday, March 21, 2007 9:54 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] CHAR data type
Importance: High



I am using PostgreSQL 8.2.3. with the default page size of 8K

 

I created the following table:

 

CREATE TABLE mystate( ID integer, name char(8000) );

 

I inserted three tuples:

 

INSERT INTO mystate VALUES (3, 'a3');

INSERT INTO mystate VALUES (5, 'a5');

INSERT INTO mystate VALUES (6, 'a6');

 

And then I ran the following query:

 

vacuum analyze mystate;           

select relpages, reltuples from pg_class where relname='mystate';

 

 

but the result was:

1                 3

 

 

If I use "char(8000)" instead of "varchar(8000)" why there is no padding
and these three tuples are inside the same page?

 

Thanks in advance,

Leticia

 

 




-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070321/130b4e0f/attachment.html>


More information about the postgis-users mailing list