From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: vdavydov.dev@gmail.com, Stanislav Zudin <szudin@tarantool.org>
Subject: Re: [tarantool-patches] [PATCH 04/13] sql: support big integers within sql binding
Date: Tue, 2 Apr 2019 10:44:49 +0300 [thread overview]
Message-ID: <20190402074449.GD25072@chai> (raw)
In-Reply-To: <c35a1f873c68cc7a593846862956e9e6ec1453a7.1552663061.git.szudin@tarantool.org>
* Stanislav Zudin <szudin@tarantool.org> [19/03/15 22:09]:
> @@ -260,6 +256,16 @@ sql_column_to_messagepack(struct sql_stmt *stmt, int i,
> mp_encode_int(pos, n);
> break;
> }
> + case SQL_UNSIGNED: {
> + assert(sql_column_is_unsigned(stmt, i));
> + int64_t n = sql_column_int64(stmt, i);
> + size = mp_sizeof_uint(n);
> + char *pos = (char *) region_alloc(region, size);
> + if (pos == NULL)
> + goto oom;
> + mp_encode_uint(pos, n);
> + break;
> + }
Tarantool does have unsigned *field type*, which in future will be
available in SQL as well. I think (ab) using SQL_UNSIGNED type
code which in future will be used for this data type in SQL (or
hopefully we will ditch SQL_* type enum and will use enum
field_type instead in entire SQL) creates a confusion.
Unsigned range is a property of SQL_INTEGER *data type*, not a data
type in itself.
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
next prev parent reply other threads:[~2019-04-02 7:44 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-15 15:45 [PATCH 00/13] sql: support -2^63 .. 2^64-1 integer type Stanislav Zudin
2019-03-15 15:45 ` [PATCH 01/13] sql: Convert big integers from string Stanislav Zudin
2019-03-25 15:10 ` [tarantool-patches] " n.pettik
2019-04-01 20:39 ` Stanislav Zudin
2019-04-02 7:27 ` Konstantin Osipov
2019-03-15 15:45 ` [PATCH 02/13] sql: make VDBE recognize big integers Stanislav Zudin
2019-03-25 15:11 ` [tarantool-patches] " n.pettik
2019-04-01 20:42 ` Stanislav Zudin
2019-04-02 7:38 ` [tarantool-patches] " Konstantin Osipov
2019-03-15 15:45 ` [PATCH 03/13] sql: removes unused function Stanislav Zudin
2019-03-25 15:11 ` [tarantool-patches] " n.pettik
2019-04-01 20:39 ` Stanislav Zudin
2019-03-15 15:45 ` [PATCH 04/13] sql: support big integers within sql binding Stanislav Zudin
2019-03-25 15:12 ` [tarantool-patches] " n.pettik
2019-04-01 20:42 ` Stanislav Zudin
2019-04-02 7:46 ` Konstantin Osipov
2019-04-02 7:44 ` Konstantin Osipov [this message]
2019-03-15 15:45 ` [PATCH 05/13] sql: removes redundant function Stanislav Zudin
2019-03-25 15:12 ` [tarantool-patches] " n.pettik
2019-03-15 15:45 ` [PATCH 06/13] sql: aux functions to support big integers Stanislav Zudin
2019-03-25 15:13 ` [tarantool-patches] " n.pettik
2019-03-15 15:45 ` [PATCH 07/13] sql: arithmetic functions " Stanislav Zudin
2019-03-25 15:13 ` [tarantool-patches] " n.pettik
2019-04-01 20:43 ` Stanislav Zudin
2019-04-02 7:54 ` Konstantin Osipov
2019-04-02 7:52 ` Konstantin Osipov
2019-03-15 15:45 ` [PATCH 08/13] sql: aggregate sql functions support big int Stanislav Zudin
2019-03-25 15:13 ` [tarantool-patches] " n.pettik
2019-04-01 20:43 ` Stanislav Zudin
2019-04-02 7:57 ` [tarantool-patches] " Konstantin Osipov
2019-03-15 15:45 ` [PATCH 09/13] sql: fixes errors Stanislav Zudin
2019-03-25 15:14 ` [tarantool-patches] " n.pettik
2019-03-15 15:45 ` [PATCH 10/13] sql: fixes an error in sqlSubInt64 Stanislav Zudin
2019-03-25 15:14 ` [tarantool-patches] " n.pettik
2019-03-15 15:45 ` [PATCH 11/13] sql: fixes an error in string to int64 conversion Stanislav Zudin
2019-03-25 15:14 ` [tarantool-patches] " n.pettik
2019-03-15 15:45 ` [PATCH 12/13] sql: fixes an error in uint64 to double casting Stanislav Zudin
2019-03-25 15:15 ` [tarantool-patches] " n.pettik
2019-03-15 15:45 ` [PATCH 13/13] sql: support -2^63 .. 2^64-1 integer type Stanislav Zudin
2019-03-25 15:25 ` [tarantool-patches] " n.pettik
2019-04-01 20:44 ` Stanislav Zudin
2019-03-25 15:10 ` [tarantool-patches] Re: [PATCH 00/13] " n.pettik
2019-04-01 20:38 ` Stanislav Zudin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190402074449.GD25072@chai \
--to=kostja@tarantool.org \
--cc=szudin@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [tarantool-patches] [PATCH 04/13] sql: support big integers within sql binding' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox