Skip site navigation (1) Skip section navigation (2)

Re: Shouldn't this be an error?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vince Vielhaber <vev(at)michvhf(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Shouldn't this be an error?
Date: 2001-01-29 16:44:39
Message-ID: 24914.980786679@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Vince Vielhaber <vev(at)michvhf(dot)com> writes:
> Shouldn't this insert fail?   This is 7.0.3.

> template1=# create table foo(x int,y varchar(10),z datetime);
> CREATE
> template1=# insert into foo(x,y,z) values(1,'asdf');
> INSERT 19222 1

We've always allowed trailing columns to be omitted, whether a column
name list is specified or not.  This is not per spec --- SQL92 and SQL99
both say that all the columns must be provided --- but I'm rather
hesitant to enforce the spec's stricter rule at this point.  Seems like
it'd probably break some existing apps.

A compromise position would be to allow dropping trailing columns only
when the column name list is omitted.

Comments?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: KuroiNekoDate: 2001-01-29 16:55:14
Subject: Re: Security hole in PL/pgSQL
Previous:From: Ross J. ReedstromDate: 2001-01-29 16:43:52
Subject: Re: Sure enough, the lock file is gone

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group