From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
Cc: | Andreas Joseph Krogh <andreak(at)officenet(dot)no>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: NOT NULL violation and error-message |
Date: | 2010-01-12 17:48:50 |
Message-ID: | 603c8f071001120948u82ddd78h9e8b2311b4dbf4e0@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 12, 2010 at 5:10 AM, Takahiro Itagaki
<itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
> Andreas Joseph Krogh <andreak(at)officenet(dot)no> wrote:
>
>> ERROR: null value in column "created" violates not-null constraint
>
> It is easy to add the table name to the message, but ...
>
>> ERROR: null value in column "public"."mytable"."created" violates not-null constraint
>> Oracle does this btw...
>
> Do we have any guideline about the message for identifier names? We've
> already had serveral "table.column" messages, but "schema.table.column"
> might be preferred if there are tables with the same name in different
> schema. In addition, separated quotes ("schema"."table"."column") are
> more SQL-ish than single outer quotes. Which should we use?
I feel like we ought to be doing this in a way where the output is
properly escaped. Right now:
test=# create table dork ("""" integer not null);
CREATE TABLE
test=# insert into dork values (null);
ERROR: null value in column """ violates not-null constraint
Suck.
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-01-12 17:52:20 | Re: damage control mode |
Previous Message | Joe Conway | 2010-01-12 17:40:00 | Re: Fix for memory leak in dblink |