Where does catalog store CHAR length ?
Where does catalog store CHAR length ?
От:
"phd9110" <phd9110@cs.nchu.edu.tw>
Дата:
hi
the table pg_attribute have the attribute "attlen" , and this attribute will
store the attribute length. For example , when integer , this value will be 4.
But if attribute type is Char(xx), this value will be -1. This is because it
reference the bychar in pg_type table.
So, where is the Char() length information store ??
and what time will system check this string length constraint ?
thanks for your help!
Kao , Nchu Taiwan
the table pg_attribute have the attribute "attlen" , and this attribute will
store the attribute length. For example , when integer , this value will be 4.
But if attribute type is Char(xx), this value will be -1. This is because it
reference the bychar in pg_type table.
So, where is the Char() length information store ??
and what time will system check this string length constraint ?
thanks for your help!
Kao , Nchu Taiwan
Re: Where does catalog store CHAR length ?
От:
Alvaro Herrera <alvherre@dcc.uchile.cl>
Дата:
On Mon, Dec 01, 2003 at 06:31:56PM +0800, phd9110 wrote: > the table pg_attribute have the attribute "attlen" , and this attribute will > store the attribute length. For example , when integer , this value will be 4. > But if attribute type is Char(xx), this value will be -1. This is because it > reference the bychar in pg_type table. > > So, where is the Char() length information store ?? atttypmod is the maximum length + 4. -- Alvaro Herrera () "El destino baraja y nosotros jugamos" (A. Schopenhauer)