Re: extend pgbench expressions with functions

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: extend pgbench expressions with functions
Date: 2016-03-09 19:12:35
Message-ID: alpine.DEB.2.10.1603091849380.25393@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Robert,

> [...] With your patch, you get different behavior depending on exactly
> how the input is malformed.

I understand that you require only one possible error message on malformed
input, instead of failing when converting to double if the input looked
like a double (there was a '.' clue int it, but that is not proof), or
something else if it was assumed to be an int.

So I'm going to assume that you do not like the type guessing.

> I'm not going to commit it this way, and frankly, neither is anyone
> else.

Hmmm. Probably my unconcious self is trying to reach 42.

Here is a v36 which inspect very carefully the string to decide whether
it is an int or a double. You may, or may not, find it to your taste, I
can't say.

--
Fabien.

Attachment Content-Type Size
pgbench-funcs-36-b.patch text/x-diff 36.0 KB
pgbench-funcs-36-c.patch text/x-diff 8.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias Kurz 2016-03-09 19:19:37 Re: Alter or rename enum value
Previous Message Robert Haas 2016-03-09 18:37:50 Re: Freeze avoidance of very large table.