Re: pgbench more operators & functions

Поиск
Список
Период
Сортировка
Искать
От
Fabien COELHO
Тема
Re: pgbench more operators & functions
Дата
Msg-id
alpine.DEB.2.20.1609262111490.28877@lancre
Ответ на
Список
Дерево обсуждения
pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Re: pgbench more operators & functions Stephen Frost <sfrost@snowman.net>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Stephen Frost <sfrost@snowman.net>
Re: pgbench more operators & functions Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench more operators & functions Stephen Frost <sfrost@snowman.net>
Re: pgbench more operators & functions Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench more operators & functions Stephen Frost <sfrost@snowman.net>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Stephen Frost <sfrost@snowman.net>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Amit Kapila <amit.kapila16@gmail.com>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Haribabu Kommi <kommi.haribabu@gmail.com>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] pgbench more operators & functions Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] pgbench more operators & functions Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <fabien.coelho@mines-paristech.fr>
Re: [HACKERS] pgbench more operators & functions Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Stephen Frost <sfrost@snowman.net>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Raúl Marín Rodríguez <rmrodriguez@carto.com>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Teodor Sigaev <teodor@sigaev.ru>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Teodor Sigaev <teodor@sigaev.ru>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Teodor Sigaev <teodor@sigaev.ru>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Teodor Sigaev <teodor@sigaev.ru>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Teodor Sigaev <teodor@sigaev.ru>
Re: [HACKERS] pgbench more operators & functions Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] pgbench more operators & functions Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions David Steele <david@pgmasters.net>
Re: pgbench more operators & functions Andres Freund <andres@anarazel.de>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Haribabu Kommi <kommi.haribabu@gmail.com>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] pgbench more operators & functions Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Michael Paquier <michael.paquier@gmail.com>
Re: pgbench more operators & functions Robert Haas <robertmhaas@gmail.com>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Re: pgbench more operators & functions Simon Riggs <simon@2ndQuadrant.com>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Michael Paquier <michael.paquier@gmail.com>
Re: pgbench more operators & functions Simon Riggs <simon@2ndQuadrant.com>
Re: pgbench more operators & functions Andres Freund <andres@anarazel.de>
Re: pgbench more operators & functions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench more operators & functions Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pgbench more operators & functions Fabien COELHO <fabien.coelho@mines-paristech.fr>
Re: pgbench more operators & functions Amit Kapila <amit.kapila16@gmail.com>
Re: pgbench more operators & functions "David G. Johnston" <david.g.johnston@gmail.com>

Hello Jeevan,

> I did the review of your patch and here are my views on your patch.

Thanks for this detailed review and debugging!

> Documentation: [...] it be a good idea to have a table of operators 
> similar to that of functions. We need not have several columns here like 
> description, example etc., but a short table just categorizing the 
> operators would be sufficient.

Ok, done.

> Further testing and review:
> ===========================
> 1. Postgres treats '^' as exponentiation rather than XOR, and '#' as XOR.
> Personally, I think it can cause confusion, so it will be better if we can stick
> to the behavior of Postgres mathematical operators.

Ok. I agree to avoid '^'.

> 2. I could not see any tests for bitwise operators in the functions.sql 
> file that you have attached.

Indeed. Included in attached version.

> 3. Precedence: [...]

Hmm. I got them all wrong, shame on me! I've followed C rules in the 
updated version.

> 5. Sorry, I was not able to understand the "should exist" comment in following
> snippet.
>
> +"xor" { return XOR_OP; } /* should exist */
> +"^^" { return XOR_OP; } /* should exist */

There is no "logical exclusive or" operator in C nor in SQL. I do not see 
why not, so I put one...

> 7. You may want to reword following comment: [...] there -> here

Ok, fixed twice.

> 8. [...] if (coerceToBool(&vargs[0])) *retval = vargs[1]; else *retval = vargs[2];

Ok.

Attached is an updated patch & test script.

-- 
Fabien.
В списке pgsql-hackers по дате отправления
От: Stephen Frost
Дата:
От: Jeff Janes
Дата:
FAQ