| От | newsreader@mediaone.net |
|---|---|
| Тема | I am confused about PointerGetDatum among other things |
| Дата | |
| Msg-id | 20010814112527.A4480@dragon.universe обсуждение исходный текст |
| Ответы |
Re: I am confused about PointerGetDatum among other things
|
| Список | pgsql-general |
Hello
I am hacking the full text indexing
c trigger found in contrib to suit my need.
(I am a C idiot having never written any
program in it)
Anyhow I have gotten all I want except
this last feature: to use a column other
than oid.
I have the following added
char *id;
..
colnum=SPI_fnumber(tupdesc,args[2]);
id=SPI_getvalue(rettuple,tupdesc,colnum);
I have also verified that id contains the column
I want by doing
elog(ERROR,id);
and it does
Now the original author uses
Datum values[2];
to insert the data and he has
values[0] = PointerGetDatum(data);
before he does
ret = SPI_execp(*(plan->splan), values, NULL, 0);
So I tried something
values[1]=PointerGetDatum(id);
as well as other variations without that
function.
Thanks in advance for any help
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера