pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedChar datatype
2+ messages / 2 participants
[nested] [flat]
* Char datatype
@ 2000-08-09 11:48 Andre Restivo <arestivo@criticalsoftware.com>
2000-10-12 03:02 ` Re: Char datatype Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Andre Restivo @ 2000-08-09 11:48 UTC (permalink / raw)
To: pgsql-admin
Hi,
Does anyone know why does pg use 4+n bytes to store a char(n) field? The
four initial bytes seem to have only null chars so why are they used?
Thx
Andre Restivo
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Char datatype
2000-08-09 11:48 Char datatype Andre Restivo <arestivo@criticalsoftware.com>
@ 2000-10-12 03:02 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2000-10-12 03:02 UTC (permalink / raw)
To: Andre Restivo <arestivo@criticalsoftware.com>; +Cc: pgsql-admin
[ Charset ISO-8859-15 unsupported, converting... ]
> Hi,
>
> Does anyone know why does pg use 4+n bytes to store a char(n) field? The
> four initial bytes seem to have only null chars so why are they used?
The 4 bytes is for the length of the string to be stored.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-10-12 03:02 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-08-09 11:48 Char datatype Andre Restivo <arestivo@criticalsoftware.com>
2000-10-12 03:02 ` Bruce Momjian <pgman@candle.pha.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox