Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

From: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE
Date: 2022-10-06 05:58:04
Message-ID: 3D769C48-C001-43F3-B45A-68D3757A71EB@yugabyte.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> xof(at)thebuild(dot)com wrote:
>
> There is no first-class "identifier" type in PostgreSQL, so a function can't "return an identifier." It returns a string which might, when placed into a larger string and processed as SQL, be lexically correct as an identifier.

It takes huge discipline always to say "the text of an identifier" when the context of discourse is established. But, yes, I agree, when I wrote this:

«
...the value of "quote_ident()" rests on the distinction between a name (what you provide with the function's actual argument) and an identifier (what it returns).
»

that the context of discourse was indeed established. I should have made no such assumption and written this instead:

«
...the value of "quote_ident()" rests on the distinction between the text of a name (what you provide with the function's actual argument) and the text of an identifier (what it returns).
»

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Smith 2022-10-06 08:30:47 Re: Support logical replication of DDLs
Previous Message Bryn Llewellyn 2022-10-06 05:48:48 Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE