Skip site navigation (1) Skip section navigation (2)

use of dblink_build_sql_insert() induces a server crash

From: Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: use of dblink_build_sql_insert() induces a server crash
Date: 2010-02-03 12:49:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hi All,


create table foo (a  int );
postgres=# SELECT dblink_build_sql_insert('foo','1 2',2,'{\"0\",
\"a\"}','{\"99\", \"xyz\"}');
HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

Version: Latest

Description:  The dblink_build_sql_insert()/get_tuple_of_interest functions
is not taking care number of attributes in the target.

PFA patch to fix the same.

Rushabh Lathia

Attachment: dblink.patch
Description: text/x-diff (603 bytes)


pgsql-hackers by date

Next:From: Andrew DunstanDate: 2010-02-03 13:41:36
Subject: Re: Add on_trusted_init and on_untrusted_init to plperl UPDATED [PATCH]
Previous:From: Teodor SigaevDate: 2010-02-03 12:14:48
Subject: Re: [CFReview] Red-Black Tree

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group