a quick question

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: a quick question
Date: 2002-09-17 20:44:54
Message-ID: Pine.LNX.4.33.0209171438570.1470-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hey, me and a few other folks were having a discussion off list, and the
subject of inserts and missing columns came up. you may remember the point
in the "I'm done" post by Bruce. It said:

> o -Disallow missing columns in INSERT ... VALUES, per ANSI
> > What is this, and why is it marked done?

We used to allow INSERT INTO tab VALUES (...) to skip the trailing
columns and automatically fill in null's. That is fixed, per ANSI.

Anyway, I just tested it on 7.3b1 and I can still do an insert with the
columns missing and it fills in defaults or nulls, with defaults being the
preference.

So, are we gonna make postgresql throw an error when someone tries to
submit an insert with too few columns to match up to the implicit column
list, or not?

This just seems like a change designed to piss off users to me, but I can
see where it does encourage better query crafting.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-09-17 20:55:49 Re: a quick question
Previous Message Tom Lane 2002-09-17 20:40:53 Re: RPMS for 7.3 beta.