Re: [BUGS] BUG #5487: dblink failed with 63 bytes connection names

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #5487: dblink failed with 63 bytes connection names
Date: 2010-06-03 01:07:53
Message-ID: 20100603100753.931D.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers


Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:

> Well, looking at the callers, most if not all of them seem to actually
> pass a palloc'd copy, allocated by text_to_cstring().
>
> Should we throw a NOTICE like vanilla truncate_identifier() does?
>
> I feel it would be better to just call truncate_identifier() than roll
> your own. Assuming we want the same semantics in dblink, we'll otherwise
> have to remember to update truncate_identifier_copy() with any changes
> to truncate_identifier().

That makes sense. Now I use truncate_identifier(warn=true) for the fix.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center

Attachment Content-Type Size
dblink_63bytes-2010-603.patch application/octet-stream 3.3 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2010-06-03 03:05:12 Re: BUG #5364: citext behavior when type not in public schema
Previous Message Jaime Casanova 2010-06-02 14:55:59 Re: Support on Postgres Database Corruption

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-06-03 01:31:34 Re: recovery getting interrupted is not so unusual as it used to be
Previous Message Florian Pflug 2010-06-03 01:07:49 Re: recovery getting interrupted is not so unusual as it used to be