Stephen Frost <sfr...@snowman.net> writes:
> * Fabien COELHO (coe...@cri.ensmp.fr) wrote:
>> In the attached patched I only included pg operators, plus "xor"
>> which I feel is missing and does not seem to harm.

> I'm pretty sure we should hold off on adding 'xor' until it's actually
> in PG proper, otherwise we run a very serious risk that whatever we do
> to add it in PG will be different from what you're suggesting we do here
> for pgbench.

Agreed --- we don't really want stuff in pgbench's language that's not
in regular SQL, IMO.

>> Indeed, some kind of "if" is needed, for instance to implement
>> "tpc-b" correctly.

> That's an interesting point..  Have you thought about ripping out the
> built-in TPC-B-like functionality of pgbench and making that into a
> script instead?

It already is a script, it's just hardwired as a string constant in
pgbench.c rather than being a separate file.  I think Fabien is
suggesting that it could be changed to more nearly approximate the
actual TPC-B spec, but IMO that would be a seriously bad idea because
it would invalidate all cross-version performance comparisons.  We
decided years ago that the default script is what it is and we aren't
going to change it to try to match TPC-B more exactly.

>> The SQL syntax for CASE is on the very heavy side and would be quite
>> complicated to implement in pgbench, so I rejected that and selected
>> the simplest possible function for the job.

> I'm not quite sure that I follow why you feel that CASE would be too
> difficult to implement here..?

If you want simple, you could provide just a subset of CASE (ie, only
the CASE WHEN boolexpr variant).  I think inventing some random new syntax
is a bad idea.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to