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 77E24205E9 for ; Wed, 17 Oct 2018 17:45:37 -0400 (EDT) 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 dHpOrofUobpo for ; Wed, 17 Oct 2018 17:45:37 -0400 (EDT) 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 0DD771FA97 for ; Wed, 17 Oct 2018 17:45:36 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 5/6] sql: return result-set type via IProto References: <4c4651e2-ef29-6d82-a9de-25e67ba54ce5@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Thu, 18 Oct 2018 00:45:34 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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, "n.pettik" >> >> 2. Why do you set types as names? > > I thought it is OK: array containing column names also can fit their types. > pColName = &(p->aColName[idx + var * p->nResColumn]); > Sorry, my fault. Function name confused me. Now I see that it takes a parameter of what attribute to set. >> 4. Why is the type 'UNKNOWN' if the value is integer? > > It is how bindings work. No, bindings as an API have nothing to do with types. It is Vdbe's issue, into which the values are inserted, and it should detect their type. It is not affinity issue, but Vdbe changing after its compilation. Anyway, a user placed a number as a parameter and got UNKNOWN - it is extra weird. By the way, '? as ' works ok - the result set contains real name instead of '?'. I think, it should work for types too. If you want to do it as a separate ticket, I do not mind, but please consult Kirill to be sure.