| From: | "Leticia" <lgomez(at)itba(dot)edu(dot)ar> |
|---|---|
| To: | <pgsql-novice(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org> |
| Subject: | CHAR data type |
| Date: | 2007-03-21 14:29:54 |
| Message-ID: | !&!AAAAAAAAAAAYAAAAAAAAAIp4oCwdczpFp3BQ+cTGVObCgAAAEAAAAImdbbaM2ltCji8I3RlcZwwBAAAAAA==@itba.edu.ar |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-novice |
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
| Attachment | Content-Type | Size |
|---|---|---|
| ATT00007.txt | text/plain | 175 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Benjamin Arai | 2007-03-21 14:43:43 | multi terabyte fulltext searching |
| Previous Message | Tijnema ! | 2007-03-21 14:27:58 | Re: [PHP] Re: phpPgAdmin - prior version available? |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Fuhr | 2007-03-21 14:40:37 | Re: Formating Date Data Type? |
| Previous Message | Ashish Karalkar | 2007-03-21 07:05:35 | Re: Formating Date Data Type? |