Re: BUG #15511: Drop table error "invalid argument"
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: ertugrul9090@gmail.com, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-bugs@lists.postgresql.org
Date: 2018-12-06T20:03:08Z
Lists: pgsql-bugs
On 2018-Dec-06, Tom Lane wrote: > Alvaro Herrera <alvherre@2ndquadrant.com> writes: > > On 2018-Nov-17, Tom Lane wrote: > >> I poked at that to the extent of testing every string in 11.1's tr.po > >> against our implementation of snprintf, and what I find is this: > >> msgid "column %s of %s" > >> msgstr "%2$s'nin %1$ sütunu" > > > I fixed this string in tr.po. At least it'll be correct in 11.2. > > Thanks! I'm also just about to push code changes for the easy parts > of what I recommended earlier (have psprintf report the bogus format > string, and make snprintf.c throw EINVAL for more error cases). Great. > 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). Peter is the authority on this, of course. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Improve our response to invalid format strings, and detect more cases.
- d8e1de899c8e 11.2 landed
- d398119c19ef 9.6.12 landed
- d2b0b60e7193 12.0 landed
- a40ee75c1e2c 9.5.16 landed
- 6dc46f8ca83d 10.7 landed
- 3a691f8a25a8 9.4.21 landed