| From: | "Michael Richards" <miker(at)interchange(dot)ca> |
|---|---|
| To: | <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | More Tuple Madness |
| Date: | 2000-12-17 17:41:16 |
| Message-ID: | 053901c06850$8eea8360$0200a8c0@digitallis |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Ok, just a small issue here:
I'm running:
select attname,attlen,attalign from pg_attribute where attnum>0 and attrelid
= (select oid from pg_class where relname = 'users') order by attnum;
This is to get the name, length of that attribute and the alignment.
The alignment seems to be wrong for type CHAR(1):
postalcode | -1 | i
gender | -1 | i
yearofbirth | 2 | s
Gender is what I'm looking at and I think it's supposed to be 16 bit
aligned.
Here is the data from that area of the tuple:
0B00 0000 5435 5420 3257 3600 0500 0000 4600 5000
The postal code, 32 bit aligned extracts fine:
'T5T 2W6'
This one is a female, the size is listed as 0500 or 5 (header plus the 1
char in it) It extracts as an 'F', but you can see the year of birth 80
comes only 6 bytes after the gender. Perhaps my original query for the
alignments is wrong...
-Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2000-12-17 18:05:48 | Re: Table name scope (was Re: Outer joins aren't working with views) |
| Previous Message | Thomas Lockhart | 2000-12-17 07:49:13 | Re: Table name scope (was Re: Outer joins aren't working with views) |