Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VwKrH-0004XV-5s for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Dec 2013 00:00:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VwKrG-00084M-Hh for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Dec 2013 00:00:54 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VwKrE-00084D-Bu for pgsql-bugs@postgresql.org; Fri, 27 Dec 2013 00:00:52 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VwKr7-00089Y-IX for pgsql-bugs@postgresql.org; Fri, 27 Dec 2013 00:00:51 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VwKr6-00047b-US for pgsql-bugs@postgresql.org; Fri, 27 Dec 2013 00:00:45 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1VwKqz-0005WO-PP for pgsql-bugs@postgresql.org; Fri, 27 Dec 2013 00:00:39 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: BUG #8702: psql \df+ translate_columns[] overflow and unexpected gettext translation To: pgsql-bugs@postgresql.org From: eshkinkot@gmail.com Message-Id: Date: Fri, 27 Dec 2013 00:00:37 +0000 X-Pg-Spam-Score: 1.2 (+) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 8702 Logged by: Sergey Burladyan Email address: eshkinkot@gmail.com PostgreSQL version: 9.3.1 Operating system: Debian testing Description: I get this result from \df+ foo: --- echo $LANG --- ru_RU.UTF-8 --- --- create function foo() returns void language plpgsql as $$ begin end $$; Список функций -[ RECORD 1 ]----------+--------------------------------------------------------------------------------------------------------------------- Схема | public Имя | foo Тип данных результата | void Типы данных аргументов | Тип | обычная Безопасность | вызывающего Изменчивость | volatile Владелец | seb Язык | plpgsql Исходный код | begin end Описание | Project-Id-Version: PostgreSQL 9 current | Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org | POT-Creation-Date: 2013-05-20 02:16+0000 | PO-Revision-Date: 2013-05-20 20:02+0400 | Last-Translator: Alexander Lakhin | Language-Team: Russian | Language: ru | MIME-Version: 1.0 | Content-Type: text/plain; charset=UTF-8 | Content-Transfer-Encoding: 8bit | X-Poedit-Language: Russian | X-Poedit-Country: RUSSIAN FEDERATION | X-Generator: Lokalize 1.5 | Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); | looks like "Description" field contains header from ru.mo messages file. src/bin/psql/describe.c:describeFunctions translate_columns[] array size is less than the maximum number of columns in query and it overflowed in src/bin/psql/print.c:printQuery at ... translate = (opt->translate_columns && opt->translate_columns[c]); ... so in my case opt->translate_columns[10] have garbage == true and "Description" field content translated unexpectedly. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs