Re: PQfnumber and duplicate column names....

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PQfnumber and duplicate column names....
Дата
Msg-id 1361.1091061266@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PQfnumber and duplicate column names....  (Ralf Hasemann <rhasemann@mac.com>)
Список pgsql-novice
Ralf Hasemann <rhasemann@mac.com> writes:
> What happens if the statement looks like:
> select 1 as FOO, 2 as FOO;  (the database has no probs with that)
> What result will PQfnumber return ????

When in doubt, look in the source code ...

/*
 * PQfnumber: find column number given column name
 *
 * The column name is parsed as if it were in a SQL statement, including
 * case-folding and double-quote processing.  But note a possible gotcha:
 * downcasing in the frontend might follow different locale rules than
 * downcasing in the backend...
 *
 * Returns -1 if no match.  In the present backend it is also possible
 * to have multiple matches, in which case the first one is found.
 */


            regards, tom lane

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

Предыдущее
От: Eduardo Vázquez Rodríguez
Дата:
Сообщение: UNIX timestamps
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: UNIX timestamps