Re: Getting Constrint information..??

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting Constrint information..??
Дата
Msg-id 20155.1019183970@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Getting Constrint information..??  (Steffen Nielsen <styf@cs.auc.dk>)
Список pgsql-hackers
Steffen Nielsen <styf@cs.auc.dk> writes:
> Can anyone tell me what wrong with the following codesnippet. I nuke the 
> server when called (stored procedure)

> for (i = 1, buf[0] = 0; i <= tupdesc->natts; i++) {                   
>                 ccbin = check[i].ccbin;

Well, for one thing, the number of check[] array entries is probably not
equal to the number of attributes of the relation.  tupconstr->num_check
tells you how many there are.  For another, check[] should be indexed
from 0 not 1 (just like all C arrays).
        regards, tom lane


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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: syslog support by default
Следующее
От: Tom Lane
Дата:
Сообщение: Re: syslog support by default