| От | Tom Lane |
|---|---|
| Тема | Re: Missing Column names with multi-insert |
| Дата | |
| Msg-id | 7708.1550519369@sss.pgh.pa.us обсуждение |
| Ответ на | Missing Column names with multi-insert (Liz Frost <web@stillinbeta.com>) |
| Список | pgsql-hackers |
Liz Frost <web@stillinbeta.com> writes:
> I'm working on a foreign data wrapper that uses INSERT, and I noticed some
> odd behaviour. If I insert just one row, the
> TupleDesc->attr[0]->attname.data has the column names in it. However, in a
> multi-row string, all those are empty strings:
There's not really any expectation that those be valid info during
planning. The parser has a substantially different code path for
single-row INSERT than multi-row (mostly to minimize overhead for the
single-row case), and probably somewhere in there is the reason why
these happen to show up as valid in that case.
If you want column names, the eref field of RTEs is usually the right
place to look.
> Am I missing something obvious? Is this a bug?
I don't think it's a bug.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера