Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDn4X-00080Y-Ss for pgsql-general@arkaria.postgresql.org; Sun, 12 Nov 2017 07:52:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eDn4X-0003vR-Ao for pgsql-general@arkaria.postgresql.org; Sun, 12 Nov 2017 07:52:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eDn4V-0003qP-Rk for pgsql-general@postgresql.org; Sun, 12 Nov 2017 07:52:52 +0000 Received: from [195.159.176.226] (helo=blaine.gmane.org) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eDn4N-0000JO-LW for pgsql-general@postgresql.org; Sun, 12 Nov 2017 07:52:50 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eDn4C-0002O3-Va for pgsql-general@postgresql.org; Sun, 12 Nov 2017 08:52:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-general@postgresql.org From: Lele Gaifax Subject: Re: Difference between CAST(v AS t) and v::t Date: Sun, 12 Nov 2017 08:52:32 +0100 Organization: Nautilus Entertainments Lines: 18 Message-ID: <87mv3sgchr.fsf@metapensiero.it> References: <87k1yx3vfi.fsf@metapensiero.it> <1041.1510418588@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cancel-Lock: sha1:1jHnoU4u5mn1MHFkHG2ntdWTsOM= X-Host-Lookup-Failed: Reverse DNS lookup failed for 195.159.176.226 (failed) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Tom Lane writes: > ... but expression-index syntax has the restriction that you need > parentheses around an expression unless it is, or at least looks like, > a function call. CAST() looks enough like a function call for this > purpose, v::t does not. > > I think there is relevant documentation for this near CREATE INDEX; > it doesn't seem like the province of the typecast docs to explain > the weirdnesses of index syntax. Thank you Tom, I really missed the explanation in CREATE INDEX doc entry! ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general