Re: using arrays within structure in ECPG

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: using arrays within structure in ECPG
Дата
Msg-id 533AEE5C.9030307@postgresql.org
обсуждение исходный текст
Ответ на Re: using arrays within structure in ECPG  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Ответы Re: using arrays within structure in ECPG  (Merlin Moncure <mmoncure@gmail.com>)
Re: using arrays within structure in ECPG  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Список pgsql-hackers
Hi Ashutosh,

> I tried to fix the offset problem. PFA the patch. It does solve the
> problem of setting wrong offset in ECPGdo() call.

Thanks, looks correct to me.

> But then there is problem of interpreting the result from server as an
> array within array of structure. The problem is there is in
> ecpg_get_data(). This function can not understand that the "field" is an
> array of integers (or for that matter array of anything) and store all
> the values in contiguous memory at the given address.

I guess I know where that comes from, without actually looking at the
code, though. Nested arrays are not supported by ecpg and the
precompiler spits out an error message, just check preproc/type.c.
However, in your example you have the struct essantially sandwiched
between the arrays and the (too) simple check in that file doesn't
notice, but because the implementation is nevertheless lacking.

I'm sorry, but this sounds like a missing feature bug.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: GSoC proposal - "make an unlogged table logged"
Следующее
От: Tom Lane
Дата:
Сообщение: get_fn_expr_variadic considered harmful