Re: Field length ??

Поиск
Список
Период
Сортировка
От Louise Catherine
Тема Re: Field length ??
Дата
Msg-id 20060420060838.46274.qmail@web33403.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Field length ??  (Louise Catherine <r1c4n@yahoo.com>)
Ответы Re: Field length ??  (Markus Schaber <schabi@logix-tt.com>)
Список pgsql-sql
Hi ,<br /><br />With this table :<br />create table test(<br />satu char(10),<br />dua char(5)<br />);<br /><br />To
getthe field length, I use this query:<br /><br />select atttypmod from pg_attribute where <br />attname='satu' and <br
/>attrelid=(selectoid from pg_class where relname='test');<br />---> result 1 : 14<br /><br />select atttypmod from
pg_attributewhere <br />attname='dua' and <br />attrelid=(select oid from pg_class where relname='test');<br />--->
result2 : 9<br /><br /><br />Could anyone explain, why the field length must be add by 4 :<br />result 1 : 10 + 4
=14<br/>result 2 : 5 + 4 = 9<br /><br />Could I use this query ? Is it valid?<br />select atttypmod-4 from pg_attribute
where<br /> attname='satu' and <br /> attrelid=(select oid from pg_class where relname='test');<br /><br />Thank's,<br
/>Rina<br/><p><hr size="1" />How low will we go? Check out Yahoo! Messenger’s low <a
href="http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com">
PC-to-Phonecall rates.</a> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Programatically Backup Database Using Visual Basic
Следующее
От: Mariya Yuniarti
Дата:
Сообщение: ask syntax sql to get length of field