From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: Serge Petrenko <sergepetrenko@tarantool.org>,
tarantool-patches@freelists.org
Subject: Re: [PATCH v2] box: add on_schema_init trigger
Date: Wed, 6 Mar 2019 19:43:01 +0300 [thread overview]
Message-ID: <20190306164300.aqwgdivl4ef5o7ty@esperanza> (raw)
In-Reply-To: <20190305185906.GC7992@chai>
On Tue, Mar 05, 2019 at 09:59:06PM +0300, Konstantin Osipov wrote:
> * Serge Petrenko <sergepetrenko@tarantool.org> [19/03/05 18:57]:
> > If you want to change space's `space_name` storage engine to `vinyl`
> > , you may say:
> > ```
> > function trig(old, new)
> > if new[3] == 'space_name' and new[4] ~= 'vinyl' then
> > return box.tuple.new{new[1], new[2], new[3], 'vinyl',
> > new[5], new[6], new[7]}
> > end
> > end
> > ```
>
> Please access tuple fields by their names ;)
Unfortunately, we can't - formats are not set in schema_init(), they are
recovered from the snapshot. Probably, we can fix that.
next prev parent reply other threads:[~2019-03-06 16:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 15:53 Serge Petrenko
2019-03-05 18:59 ` Konstantin Osipov
2019-03-06 16:43 ` Vladimir Davydov [this message]
2019-03-05 19:00 ` Konstantin Osipov
2019-03-06 16:41 ` Vladimir Davydov
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=20190306164300.aqwgdivl4ef5o7ty@esperanza \
--to=vdavydov.dev@gmail.com \
--cc=kostja@tarantool.org \
--cc=sergepetrenko@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [PATCH v2] box: add on_schema_init trigger' \
/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