Subject: misleading lang_name case in CREATE FUNCTION doc.

From: Marc Mamin <[email-masked]>
Date: Fri, 11 Oct 2013 08:37:55 +0000

Hi,
you might want to lowercase the language names in order to be compatible with the case restriction introduced in  9.2.
or add a sentence like
'when using single quotes, the names  are case sensitive (with is lowercase for most (all?) languages).

regards,

Marc Mamin

http://www.postgresql.org/docs/9.3/static/sql-createfunction.html

lang_name

    The name of the language that the function is implemented in.
    Can be SQL, C, internal, or the name of a user-defined procedural language.
    For backward compatibility, the name can be enclosed by single quotes.

http://www.postgresql.org/docs/current/static/release-9-2.html

No longer forcibly lowercase procedural language names in CREATE FUNCTION (Robert Haas)

While unquoted language identifiers are still lowercased,
strings and quoted identifiers are no longer forcibly down-cased.
Thus for example CREATE FUNCTION ... LANGUAGE 'C' will no longer work;
it must be spelled 'c', or better omit the quotes.

---

From: Peter Eisentraut <[email-masked]>
Date: Wed, 13 Nov 2013 06:56:04 -0500

On Fri, 2013-10-11 at 08:37 +0000, Marc Mamin wrote:
> Hi,
> you might want to lowercase the language names in order to be
> compatible with the case restriction introduced in  9.2.
> or add a sentence like

Yeah, I'm having trouble coming up with a wording that is sufficiently
brief.  We don't want the backward compatibility text to be longer than
the main description, I think.

-- 
Sent via pgsql-docs mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

---

From: Marc Mamin <[email-masked]>
Date: Wed, 13 Nov 2013 14:02:43 +0000

> From: Peter Eisentraut [mailto:[email-masked]]
> Sent: Mittwoch, 13. November 2013 12:56

> the main description, I think.

something like :?

The name of the language that the function is implemented in. 
Can be 'sql', 'c', 'internal', or the name of a user-defined procedural language. 
Single quotes are optional, they required correct case when used.

regards,

Marc Mamin

---

From: Peter Eisentraut <[email-masked]>
Date: Tue, 26 Nov 2013 13:32:14 -0500

> Single quotes are optional, they required correct case when used.

That would make the deprecated syntax more prominent than the
non-deprecated one.  We want to get rid of the single quotes.

---

From: Marc Mamin <[email-masked]>
Date: Tue, 26 Nov 2013 19:28:17 +0000

>Von: Peter Eisentraut [[email-masked]]

>non-deprecated one.  We want to get rid of the single quotes.

Ok, next try :)

The name of the language that the function is implemented in.
Can be sql, c, internal, or the name of a user-defined procedural language.
Single quotes are deprecated. They require  correct case when used.

regards,
Marc Mamin

---

From: Bruce Momjian <[email-masked]>
Date: Thu, 13 Feb 2014 17:07:30 -0500

> Single quotes are deprecated. They require  correct case when used.

I have applied the attached patch to improve the wording.  Thanks for
the report.

-- 
  Bruce Momjian  <[email-masked]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +
diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml
new file mode 100644
index 81278bb..b61b978
*** a/doc/src/sgml/ref/create_function.sgml
--- b/doc/src/sgml/ref/create_function.sgml
*************** CREATE [ OR REPLACE ] FUNCTION
*** 252,261 ****
       <listitem>
        <para>
         The name of the language that the function is implemented in.
!        Can be <literal>SQL</literal>, <literal>C</literal>,
         <literal>internal</literal>, or the name of a user-defined
!        procedural language.  For backward compatibility,
!        the name can be enclosed by single quotes.
        </para>
       </listitem>
      </varlistentry>
--- 252,261 ----
       <listitem>
        <para>
         The name of the language that the function is implemented in.
!        It can be <literal>sql</literal>, <literal>c</literal>,
         <literal>internal</literal>, or the name of a user-defined
!        procedural language, e.g. <literal>plpgsql</literal>.  Enclosing the
!        name in single quotes is deprecated and requires matching case.
        </para>
       </listitem>
      </varlistentry>