pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Markus Bertheau <twanger@bluetwanger.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Patches (PostgreSQL) <pgsql-patches@postgresql.org>
Subject: Re: [SQL] array_in: '{}}'::text[]
Date: Sat, 28 Aug 2004 15:41:27 -0700
Message-ID: <41310A17.5020405@joeconway.com> (raw)
In-Reply-To: <1093723759.2732.16.camel@teetnang>
References: <1093261555.2647.6.camel@dicaprio.akademie1.de>
	<412A384C.5000907@joeconway.com>
	<412F9BA5.8070009@joeconway.com>
	<14978.1093662341@sss.pgh.pa.us>
	<4130DE0F.7030207@joeconway.com>
	<1093723759.2732.16.camel@teetnang>

Markus Bertheau wrote:
> 
> Without looking at the code in a whole, you accept '{} ' as an empty
> array literal, so why is the special case for '{}' needed here?

It's a fast path for a common special case. Why spend any cycles parsing 
if we can immediately recognize it? However, anything other than a 
simple '{}' does require parsing.

Joe



view thread (8+ messages)

Message-ID: <41310A17.5020405@joeconway.com>
Permalink:  ../41310A17.5020405@joeconway.com/
Also on:    postgresql.org/message-id/41310A17.5020405@joeconway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mail@joeconway.com, twanger@bluetwanger.de, tgl@sss.pgh.pa.us, pgsql-patches@postgresql.org
  Subject: Re: [SQL] array_in: '{}}'::text[]
  In-Reply-To: <41310A17.5020405@joeconway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox