From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | ertugrul9090(at)gmail(dot)com, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #15511: Drop table error "invalid argument" |
Date: | 2018-12-06 20:55:12 |
Message-ID: | 29810.1544129712@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> On 2018-Dec-06, Tom Lane wrote:
>> Is anybody interested in the idea of making our own validator for
>> the .po files? I might be willing to code it up, if I knew what
>> its API ought to be, but I don't know the workflow in that area.
> I think it's definitely worthwhile to avoid introducing bogus files in
> the Pg repo.
> The work is done by these scripts:
> https://git.postgresql.org/gitweb/?p=pgtranslation/admin.git;a=tree;h=refs/heads/master;hb=refs/heads/master
> cp-po does some validation while copying the file from the pgtranslation
> repo back to Postgres, but I think that's the wrong time (at release
> time). The good one I think is wwwtools/pg-make-po, which runs a few
> times daily and produces the error file that ends up in the status table
> in babel.postgresql.org. We'd want something that produces output that
> can be appended to the $outdir/$catalogname-$lang.po.err file (lines
> 103ff of that script).
Hm. So that's all Perl code...
In principle, we could write some Perl code that exactly matches what
snprintf.c thinks is valid input, but I think that keeping it in sync
would be a nightmare. The concept I had in mind was to make a variant
version of snprintf.c that just validates a format string, and can be
compared to snprintf.c by diff'ing. (Or, perhaps, sprinkle snprintf.c
with #ifdefs so that compiling it with the right -D flag produces what
we want; though that might look too ugly.) If you don't mind adding
a C compiler to the list of dependencies for pg-make-po, we could imagine
having it compile up such a program at startup and then apply it to
each catalog.
> Peter is the authority on this, of course.
Yup. Peter, any comments?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2018-12-06 21:00:42 | Re: BUG #15511: Drop table error "invalid argument" |
Previous Message | Alvaro Herrera | 2018-12-06 20:03:08 | Re: BUG #15511: Drop table error "invalid argument" |