On 2026-02-02 21:04 +0100, Hoda Salim wrote:
> > nchar is an alias of bpchar.  There's no cast to char behind the scenes
> > since that would truncate the string:
> >
> >         select n'foo', 'foo'::character;
> >          bpchar | bpchar
> >         --------+--------
> >          foo    | f
> >         (1 row)
> 
> Thank you for catching this! I verified the behavior and updated the
> documentation to correctly state that N'...' is equivalent to a bpchar
> literal.

Thanks!  The text looks good now.  But please fix the indentation of the
second paragraph (should be one space per level).  Your first patch was
correct in that regard.

> > Should we also mention the nchar alias in [4]?
> > [4] https://www.postgresql.org/docs/current/datatype-character.html
> 
> I'm happy to add that in a v3 if you think it belongs in this patch.
> I wasn't sure if it would be preferred separately or together.

I'd prefer a single patch with both changes to have an atomic change.
But in the end it's up to the committer, not me.

--
Erik Wienhold


Reply via email to