| От | dawizz |
|---|---|
| Тема | Conversion between BpChar and "C" char |
| Дата | |
| Msg-id | 200511181751.25838.wwwillem@zonnet.nl обсуждение исходный текст |
| Список | pgsql-novice |
Dear all,
Can anyone give me a hint about converting and casting between
BpChar and char.. I'm trying to return the value off buff, and I have the
example from one site in zcech language. So I'm looking for the missing
link.. Because I think I do not handle the memory calls correclty ;-(
If I get on the right rack I'm very pleased ofcource... ;-)
int *idx;
int *varlen;
char *buff[40];
char *term = "\n";
char *line = "-";
varlen = (int *) flow;
while (idx <= varlen) {
idx++;
buff[*idx] = line;
buff[*idx +1] = term;
}
BpChar *result = palloc (VARHDRSZ + 1);
VARATT_SIZEP (result) = VARHDRSZ + 1;
*(VARDATA (result)) = 'M';
PG_RETURN_BPCHAR_P (result);
//PG_RETURN_INT32(flow);
Thanks in advance, kind regards,
Willem
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера