From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0FBD825DC0 for ; Wed, 16 Jan 2019 10:35:28 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SoOY2SToedg6 for ; Wed, 16 Jan 2019 10:35:27 -0500 (EST) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id AE44423D52 for ; Wed, 16 Jan 2019 10:35:27 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: [tarantool-patches] Re: [PATCH v3 5/6] sql: 'PRAGMA' result in the appropriate format From: "n.pettik" In-Reply-To: <1b0d86990ecf8c9b310cdfdc58ec9006c77c038a.1545844480.git.imeevma@gmail.com> Date: Wed, 16 Jan 2019 18:35:25 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <31FE8701-BB3C-4D38-879C-5A313789F3DF@tarantool.org> References: <1b0d86990ecf8c9b310cdfdc58ec9006c77c038a.1545844480.git.imeevma@gmail.com> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Imeev Mergen >> There is no =E2=80=99Tarantool format=E2=80=99... > Changed to "more appropriate=E2=80=9D. Cmon, it is called YAML... >=20 >> Why do you consider it as wrong? AFAIR I made it exclusively to >> extend debug facilities. >>=20 >> Things like >> - ['index_info', null] >> - ['index_list', null] >>=20 >> look quite strange IMO. What is more, it may be misleading: >> index_list with null arg looks like there is no indexes at all. > Changed rows with values =3D=3D NULL. Now instean of NULL they shows > "No value=E2=80=9D. Now it is even worse. I vote for displaying only flag pragmas and make second field of resulting filed to be of type bool.=20 You can ask other members for their opinion. >> Btw I don=E2=80=99t understand all these efforts to make pragma >> better. As I already said we are going to remove it anyway. > I thought it would be correct, since it can be used by the user. It can be used by users until we remove it. That=E2=80=99s it. > commit 1b0d86990ecf8c9b310cdfdc58ec9006c77c038a > Author: Mergen Imeev > Date: Thu Dec 13 21:07:31 2018 +0300 >=20 > sql: 'PRAGMA' result in the appropriate format >=20 > Currently, box.sql.execute('PRAGMA') returns nothing but it prints > some information on stdout. Nit: be specific: not =E2=80=99some information=E2=80=99 but list of = pragmas and their statuses. Nit: print to stdout. > This looks wrong. "Such strategy is considered to be wrong since output of this command would be unavailable for users who redirect stdout, use net box connection etc." > This patch makes the > command to return result in more appropriate format. "In yaml format as the rest of SQL commands.=E2=80=9D Sorry for being too meticulous. >=20 > diff --git a/test/sql/sql-debug.result b/test/sql/sql-debug.result > index 692fa82..9c5c9b3 100644 > --- a/test/sql/sql-debug.result > +++ b/test/sql/sql-debug.result Why did you move test to this file? PRAGMA itself is not debug-only command.