From: | Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Outputting Standard SQL |
Date: | 2019-08-25 18:49:11 |
Message-ID: | 2244fdc1-6da8-fef6-ca6c-40cab18ce6cb@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This is a minor gripe in the grand scheme of things, but I'm a little
annoyed that we accept standard SQL but then don't spit it back out.
For example:
```
EXPLAIN (COSTS OFF) SELECT * FROM pg_am WHERE amname LIKE '%t%';
QUERY PLAN
-----------------------------------
Seq Scan on pg_am
Filter: (amname ~~ '%t%'::text)
(2 rows)
```
Why don't we convert that back to LIKE? Sure, if someone actually typed
"~~" instead of "LIKE" then that wouldn't match what they wrote, but I
much prefer differing in that direction than the current one.
I am not advocating we attempt anything more complex such as "x ~>=~ 'y'
AND x ~<~ 'z'", just that we output SQL where feasible. I would like to
fiddle with this if there is consensus that a decent patch would be
accepted.
--
Vik Fearing
From | Date | Subject | |
---|---|---|---|
Next Message | Ibrar Ahmed | 2019-08-25 18:50:44 | Re: pg_upgrade: Error out on too many command-line arguments |
Previous Message | Peter Geoghegan | 2019-08-25 18:37:38 | "Classic" nbtree suffix truncation prototype |