Add hint for function named "is"

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Subject: Add hint for function named "is"
Date: 2016-08-11 21:11:03
Message-ID: 99ad0450-b1ab-702f-48ef-6972b630bc87@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

CREATE FUNCTION pg_temp.is() RETURNS text LANGUAGE sql AS $$SELECT
'x'::text$$;
SELECT 'x'||is();
ERROR: syntax error at or near "("
LINE 1: SELECT 'x'||is();

I was finally able to figure out this was because "is" needs to be
quoted; is there a way this could be hinted?

FWIW, the real-world case here comes from using pgTap, which has an is()
function. I've used that countless times by itself without quoting, so
it never occurred to me that the syntax error was due to lack of quotes.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532) mobile: 512-569-9461

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-08-11 21:17:31 Re: Small issues in syncrep.c
Previous Message Peter Eisentraut 2016-08-11 20:09:53 Re: money type overflow checks