Re: INSERT ... VALUES... with ORDER BY / LIMIT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: INSERT ... VALUES... with ORDER BY / LIMIT
Date: 2010-10-03 15:10:38
Message-ID: 742.1286118638@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
> DEFAULT is disallowed now in such VALUES list, but we can explain it
> is allowed in a "simple" VALUES of INSERT case.

I don't think we really need to explain anything. This is per spec;
if you trace the way that a DEFAULT expression can appear in INSERT,
it's treated as a <contextually typed value specification>,
which appears in <contextually typed table value constructor>,
which is VALUES and nothing else.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-10-03 15:29:12 Re: Heads up: upcoming back-branch releases
Previous Message Tomoaki Sato 2010-10-03 14:46:21 pgadmin3_90 package