Danilo Fortunato writes:
> Can anybody explain the meaning of the N string operator ?
> Is there a section in the PostgreSQL documentation that describes it ?
I couldn't find it in the manual either, but using it seems to yield
values of type char instead of varchar/text:
,----
| scratch=# select N'foo ';
| bpchar
| --------
| foo
|
| scratch=# \dT bpchar
| List of data types
| Schema | Name | Description
| ------------+-----------+---------------------------------------------------------
| pg_catalog | character | char(length), blank-padded string, fixed storage length
`----
In contrast to the N'' input syntax, the blank-padding type itself is
documented under "Character Types" and leads to different semantics with
various operators/functions. E.g.:
,----
| scratch=# select length(N'foo '), length('foo ');
| length | length
| --------+--------
| 3 | 6
| (1 row)
`----
regards,
Andreas