Getting Constrint information..??

Поиск
Список
Период
Сортировка
От Steffen Nielsen
Тема Getting Constrint information..??
Дата
Msg-id 1019182549.3cbf7dd5d431e@www.cs.auc.dk
обсуждение исходный текст
Ответы Re: Getting Constrint information..??  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Help!

Can anyone tell me what wrong with the following codesnippet. I nuke the 
server when called (stored procedure)

... some VALID spi_exec call :-) has been done ...

TupleDesc tupdesc = SPI_tuptable->tupdesc;
TupleConstr *tupconstr = SPI_tuptable->tupdesc->constr;
ConstrCheck  *check = tupconstr->check;
SPITupleTable *tuptable = SPI_tuptable;
char *ccbin;

char buf[8192];
int i;

for (i = 1, buf[0] = 0; i <= tupdesc->natts; i++) {                                  ccbin = check[i].ccbin;
  sprintf(buf + strlen (buf), "%s, %s",                       SPI_fname(tupdesc,i),                       ccbin);
       elog (NOTICE, "%s", buf);
 
}




I have not had any luck :-( I'm a C beginner thou, so maybe i screw up when 
accessing the structures

Any help is appreciated

/Steffen Nielsen



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Schema (namespace) privilege details
Следующее
От: "Rod Taylor"
Дата:
Сообщение: Re: Schema (namespace) privilege details