Re: dblink not returning result

Поиск
Список
Период
Сортировка
От Robins Tharakan
Тема Re: dblink not returning result
Дата
Msg-id 4EB24D83.1010809@comodo.com
обсуждение исходный текст
Ответ на dblink not returning result  (AI Rumman <rummandba@gmail.com>)
Список pgsql-general
Hi,

 From reading your email and from the URL below, it seems that the error
is because it's returning the status of the first call (where you are
beginning the transaction and making the first query).

http://www.postgresql.org/docs/9.1/static/contrib-dblink-get-result.

Have you tried doing a simple SELECT expecting a one-row-one-column
after each call ? (before you make the next SELECT) ?

--
Robins Tharakan

On 11/03/2011 12:56 PM, AI Rumman wrote:
> ------------------------------------------------------------
> select new_conn('conn1');
> select dblink_send_query('conn1','begin;  update t2 set i=10 where
> nam=''a1'';');
> select dblink_send_query('conn1','select i,nam from t2')
>
> select * from dblink_get_result('conn1') as t2(i int, nam text);
> ERROR:  function return row and query-specified return row do not match
> DETAIL:  Returned row contains 1 attribute, but query expects 2.
> select dblink_send_query('conn2','rollback');
>
> *-- Supposed to send result here*
> pgdb=# select * from dblink_get_result('conn1') as t2(i int, nam text);
>   i | nam
> ---+-----
> (0 rows)
>
> pgdb=# select * from t2;
>   i |  nam
> ---+-------
>   1 | asdas
>   2 | a1
> (2 rows)
> ------------------------------------------------------------------
>
> Could any one please tell me why?


Вложения

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

Предыдущее
От: devrim@gunduz.org
Дата:
Сообщение: Re: Why is there no 8.3.16 rpm with _id ?
Следующее
От: Allan Kamau
Дата:
Сообщение: Re: Recommendations for SSDs in production?