Re: ColumnName and ColumnNumber in libpq (C interface)
В списке pgsql-interfaces по дате отправления:
| От | Christoph Haller |
|---|---|
| Тема | Re: ColumnName and ColumnNumber in libpq (C interface) |
| Дата | |
| Msg-id | 3F66C11E.AE5B7B97@rodos.fzk.de обсуждение |
| Ответ на | ColumnName and ColumnNumber in libpq (C interface) (Alberto Cabello Sanchez <alberto@unex.es>) |
| Список | pgsql-interfaces |
>
> Christoph Haller <ch@rodos.fzk.de> writes:
> >> I thougth running this helloworldish C program:
> >> should print
> >> Bar
> >> 0
> >>
> >> but stdout shows
> >> Bar
> >> -1
> >>
>
> > All names are folded to lowercase, except enclosed in double quotes.
So
> > printf("%d\n",PQfnumber(res,"\"Bar\""));
> > gives you the right result.
>
> I wonder whether this behavior is appropriate for PQfnumber, though.
> It's never been documented ... and certainly should be if we decide
> we should keep it. Comments?
>
> regards, tom lane
>
I'd say it should be left as it is, and documented of course.
I can see a possible ambiguity, if someone is queer enough to
define columns like "bar", "Bar", "BAR", etc. within the same table.
Regards, Christoph
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера