nchar is undocumented

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: nchar is undocumented
Date: 2024-05-05 00:41:28
Message-ID: om3g7p7u3ztlrdp4tfswgulavljgn2fe6u2agk34mrr65dffuu@cpzlzuv6flko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

While studying the parser, I noticed that we support nchar and the n''
literal. But both concepts are undocumented. That may be intentional
because nchar is just an alias for char and because all our string types
are multibyte and therefore essentially national character strings.

I was looking through the archive for previous discussions and found:

* Thread [1] (about making nchar a distinct type) which noted that docs
are missing but nobody proposed a fix.

* Thread [2] where Peter Eisentraut suggested leaving nchar undocumented
until it's figured out if our implementation matches the standard.

What bugs me about the missing docs is that 7081ac46ace added nchar to
the intro for table 9.47[3], assuming that the reader already knows
about nchar. That's the only instance of nchar in the docs (besides the
keyword list).

So, I think we should either remove that one nchar instance (because it
doesn't add any real value) or document it properly. The attached patch
does the latter.

[1] https://www.postgresql.org/message-id/B1A7485194DE4FDAB8FA781AFB570079%40maumau
[2] https://www.postgresql.org/message-id/1275895438.1849.1.camel%40fsopti579.F-Secure.com
[3] https://www.postgresql.org/docs/16/functions-json.html#FUNCTIONS-JSON-CREATION-TABLE

--
Erik

Attachment Content-Type Size
0001-Document-nchar-data-type-alias.patch text/x-diff 1.9 KB

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David Rowley 2024-05-05 01:04:11 Re: nchar is undocumented
Previous Message Tom Lane 2024-05-04 17:52:21 Re: RETURNING order guarantees documentation