Shouldn't this be an error?

From: Vince Vielhaber <vev(at)michvhf(dot)com>
To: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Shouldn't this be an error?
Date: 2001-01-29 16:21:38
Message-ID: Pine.BSF.4.30.0101291113300.30993-100000@paprika.michvhf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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
template1=#

If not, why not? z's missing from the values(). Sybase fails it:

1> create table foo(x int,y varchar(10),z datetime)
2> go
1> insert into foo(x,y,z) values(1,'asdf')
2> go
Msg 109, Level 15, State 1
, Line 1
There are more columns in the INSERT statement than values specified in
the VALUES clause. The number of values in the VALUES clause must match
the number of columns specified in the INSERT statement.
1>

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev(at)michvhf(dot)com http://www.pop4.net
128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2001-01-29 16:29:31 Re: Security hole in PL/pgSQL
Previous Message robert gravsjo 2001-01-29 16:19:21 Re: BLOB HOWTO??