Tarantool discussions archive
 help / color / mirror / Atom feed
From: Imeev Mergen <imeevma@tarantool.org>
To: Konstantin Osipov <kostja.osipov@gmail.com>
Cc: tarantool-discussions@dev.tarantool.org
Subject: Re: [Tarantool-discussions] Implicit cast for ASSIGNMENT
Date: Thu, 30 Apr 2020 15:56:51 +0300
Message-ID: <8c71af0d-3693-82d5-4b15-f7b7fe38062c@tarantool.org> (raw)
In-Reply-To: <20200430123500.GA6499@atlas>


On 4/30/20 3:35 PM, Konstantin Osipov wrote:
> * Imeev Mergen <imeevma@tarantool.org> [20/04/30 15:13]:
>> Hi! Here we go again. Last time we have not come to a colclusion.
>>
>> So, I suggest these rules for implicit cast for ASSIGNMENT:
>> 1) Any value can be implicitly cast to ANY type.
>> 2) Any scalar values ​​can be implicitly cast to SCALAR type.
>> 3) Values ​​of numeric types can be implicitly cast to other numeric
>> types.
> SQL is strictly typed, there should be no implicit conversions
> between numeric types.
>
> The only possible exception is conversion of a lossless conversion
> of a numeric literal, e.g.:
>
> float_val = 1.1 -- implicitly convert decimal constant 1.1 to float
So, is it fine to implicitly cast 1.0(DOUBLE) to 1(INTEGER)?

>
>> 4) Implicit casting is prohibited, except as described above.
>>
>>
>> I think that the rules for implicit casting when assigning value
>> of numeric type must be the same as in C.

  reply	other threads:[~2020-04-30 12:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 14:25 Mergen Imeev
2020-02-13 14:40 ` Konstantin Osipov
2020-02-13 22:20 ` Peter Gulutzan
2020-04-30 12:04 ` Imeev Mergen
2020-04-30 12:35   ` Konstantin Osipov
2020-04-30 12:56     ` Imeev Mergen [this message]
2020-04-30 13:09       ` Konstantin Osipov
2020-04-30 13:12         ` Imeev Mergen
2020-04-30 14:04           ` Konstantin Osipov
2020-04-30 14:15             ` Peter Gulutzan
2020-04-30 14:28               ` Konstantin Osipov
2020-04-30 14:40   ` Peter Gulutzan
2020-04-30 15:10     ` Imeev Mergen
2020-04-30 16:04       ` Peter Gulutzan
2020-05-07 16:14         ` Peter Gulutzan
2020-05-08 11:57           ` Kirill Yukhin
2020-04-30 22:52       ` [Tarantool-discussions] Descriptive SQL Style Guide Peter Gulutzan

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=8c71af0d-3693-82d5-4b15-f7b7fe38062c@tarantool.org \
    --to=imeevma@tarantool.org \
    --cc=kostja.osipov@gmail.com \
    --cc=tarantool-discussions@dev.tarantool.org \
    /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

Tarantool discussions archive

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lists.tarantool.org/tarantool-discussions/0 tarantool-discussions/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 tarantool-discussions tarantool-discussions/ https://lists.tarantool.org/tarantool-discussions \
		tarantool-discussions@dev.tarantool.org.
	public-inbox-index tarantool-discussions

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git