From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jesper Krogh <jesper@krogh.cc>
Cc: pgsql-sql@postgresql.org
Subject: Re: The empty list?
Date: Thu, 02 Nov 2006 17:34:23 -0500
Message-ID: <21991.1162506863@sss.pgh.pa.us> (raw)
In-Reply-To: <454A654B.2000306@krogh.cc>
References: <454A654B.2000306@krogh.cc>
Jesper Krogh <jesper@krogh.cc> writes:
> Whereas this gives a syntax error:
> # select 1 in ();
> ERROR: syntax error at or near ")" at character 14
> LINE 1: select 1 in ();
> ^
If we took that syntax it would probably mean a zero-element row,
not an empty IN list. But I'm disclined to allow either, as it'd
seem entirely too likely to convert plain old typos into queries
the system will think are valid ...
I think the short answer why the spec disallows this (which it does)
is that it considers the right-hand side to be a table, and with
absolutely nothing there, there is no way to impute a rowtype to the
table.
regards, tom lane
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: tgl@sss.pgh.pa.us, jesper@krogh.cc
Subject: Re: The empty list?
In-Reply-To: <21991.1162506863@sss.pgh.pa.us>
* 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