Re: INSERT INTO ... RETURNING id not behaving as expected with SQLNumResultCols

Поиск
Список
Период
Сортировка
От Gustavo Pinsard
Тема Re: INSERT INTO ... RETURNING id not behaving as expected with SQLNumResultCols
Дата
Msg-id 4CADAAFD.2020501@rocksolid.com.br
обсуждение исходный текст
Ответ на INSERT INTO ... RETURNING id not behaving as expected with SQLNumResultCols  (Ryan Pfeiffer <malice_ryan@yahoo.com>)
Ответы Re: INSERT INTO ... RETURNING id not behaving as expected with SQLNumResultCols  (Ryan Pfeiffer <malice_ryan@yahoo.com>)
Список pgsql-odbc
Ryan,

What language are you writing your app? What is the code you're using to
capture the returning id?

Also, are you aware that you can fire a new SELECT statement after
you're done inserting?  In scenarios where you wouldn't have much
concurrency that can be a valid approach.

And don't forget that the OID column is there for you to inspect. Ever
tried a SELECT OID FROM MyTable ORDER BY OID DESC LIMIT 1 ?

Gustavo

On 07/10/2010 01:04, Ryan Pfeiffer wrote:
> I'm using Postgres 8.4.1 and psqlodbc 08.04.0200. I'm trying to execute a statement INSERT INTO table/values
RETURNINGid to get the serial id. Problem is, SQLNumResultCols shows that there are zero columns. The statement I used
worksfine in pgadmin. This seems really basic and I am somewhat new to databases and odbc, but does anyone have a
solution?
>
> Thanks,
> Ryan
>
>
>
>


Вложения

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

Предыдущее
От: Ryan Pfeiffer
Дата:
Сообщение: INSERT INTO ... RETURNING id not behaving as expected with SQLNumResultCols
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: [BUGS] BUG #5694: Postgres ODBC SQLTables is not working correctly