Re: Bad Data back Door

From: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bad Data back Door
Date: 2012-10-06 17:37:02
Message-ID: CAOeZVie_XK=p3f2NamX91fBQwzAzu4Gk_Wubcn8aybeWwXxO9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 6, 2012 at 1:34 PM, David E. Wheeler <david(at)justatheory(dot)com> wrote:
> On Oct 5, 2012, at 6:12 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> Probably not so much "assumed" as "nobody thought about it". In
>> e.g. plperl we expend the cycles to do encoding validity checking on
>> *every* string entering the system from Perl. I'm not sure why foreign
>> tables ought to get a pass on that, especially when you consider the
>> communication overhead that the encoding check would be amortized
>> against.
>
> Yes, that’s what I was thinking.
>
>> Now, having said that, I think it has to be the reponsibility of the FDW
>> to apply any required check ... which makes this a bug report against
>> oracle_fdw, not the core system. (FWIW, contrib/file_fdw depends on the
>> COPY code, which will check encoding.)
>
> I agree that this is a bug in oracle_fdw (well, potentially; ultimately, it’s Oracle that’s lying about the encoding of those text values). But I think that it would be much more useful overall -- not to mention more database-like -- for PostgreSQL to provide a way to enforce it. That is, to consider foreign tables to be an input like COPY or SQL, and to validate values before displaying them.
>
> Best,
>
> David
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

+1
--
Regards,

Atri
l'apprenant

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Atri Sharma 2012-10-06 18:33:33 Regarding identifying a foreign scan
Previous Message David E. Wheeler 2012-10-06 17:34:36 Re: Bad Data back Door