Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1iBa-0007Pn-VH for pgsql-docs@arkaria.postgresql.org; Sun, 07 Jun 2015 21:32:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z1iBZ-0006xe-To for pgsql-docs@arkaria.postgresql.org; Sun, 07 Jun 2015 21:32:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z1iBZ-0006xX-2x for pgsql-docs@postgresql.org; Sun, 07 Jun 2015 21:32:53 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84) (envelope-from ) id 1Z1iBV-0005rm-Po for pgsql-docs@postgresql.org; Sun, 07 Jun 2015 21:32:52 +0000 Received: from ex ([109.44.220.28]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0Mb8mZ-1YnCVC1myB-00KgG9; Sun, 07 Jun 2015 23:32:45 +0200 From: Andreas Seltenreich To: Danilo Fortunato Cc: pgsql-docs@postgresql.org Subject: Re: What is the meaning of the N string operator ? In-Reply-To: <5574AD22.8010508@gmail.com> (Danilo Fortunato's message of "Sun, 07 Jun 2015 22:44:18 +0200") References: <5574AD22.8010508@gmail.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (gnu/linux) Message-ID: <87bngrp5l0.fsf@ex.ansel.ydns.eu> Date: Sun, 07 Jun 2015 23:32:43 +0200 MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:SwHiZmlDb6KDXDEg+pVo3APphRjyzNa+NwQETMAKZwc612l1TjX bBAXt3xjiNLaEGsmfgOWjIBVFCto6q0knSQE78hty+E38AhId+SO/FojaLi1rOODz0+vV/w lUip0xCN9d/tY33woyluWKCoK0lzbRCk89RgGseNZS5w4MVlr/yWM+ROGklIcqSfkmN8hd9 r2qCsUCAYL4eTk9kqPYIA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZiTCvZw8Bao=:/KGMkHuX6/WQSyYHhliET6 KXSjcJGU6/oZ2oK1owL14q5bRIOq4xWBCpUgrHQ930rWexxR5rjp3ZUj9iImVvSd6h0OBc4lq UI7Q9ML8F3jv2tCKkydig2a7AVxfstLcT+xt/pVWJ1+Mf9tWNjgjJGBpvh4h833v/WBkQDIKZ JJ49uTvrDsHVs+vQTcOhM0xo1mLdbaIJWkfFqx5VlRqU1SV8XpXJ/uXhrrm5naklf+/otzoej dCXAiWsfr6MMWbGMACYihUBYThDBgRdFNnlgTMjVHbZGDjOUPgz5SLCLsZZVV2ZwyNOOrS7GS m9buXFhq0JIVd78wNoxZbBzenL9eJ7w5I3stlnu9Ncj1AfC/T77giP4GrGjhqVNLrEC5mGQcj QLB32d2iEjtW4x2Btrtizt0d6N9DHFrbHMXPj4HREcK13I+udl2bl9kUftZUTXowVhKkAQQxw fGhXuqDwRCKkz9yCxfFaSOyQdoax5OeMB8m7QGb+tWypyAwQVsQdy+x6Xt7BYxuRYu3bYP+Ob lmJvBdT1diJkpNebgklfUWvJ6Rr+9dg0hxb6awaLNDFBB7SkYbdomQCTeXj+40ywSYxZKjCH1 EaEv66OyvXKDrWbxLruOqZ15/mnCWM5TUo6ZzpuppJe0F9yD2NQK0LQ6pORPc2y8MxG7W4075 RmeRUDHRsMOQWBmRSwIoqgN8uMxoVBBfyWcIxKFXVLHGaaw== X-Pg-Spam-Score: -3.0 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org 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 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs