From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Ana Louro <anaoliveiralouro(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: error null value in column" concat_id" violates not-null constraint |
Date: | 2010-11-26 07:45:28 |
Message-ID: | AANLkTi=+=m8z1hmhDKtvUwiaKTAVCr2M+Armsm+5X1fq@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hello
2010/11/25 Ana Louro <anaoliveiralouro(at)gmail(dot)com>:
> Hi,
> I'm just beggining in PostgreSql 9.0
>
> I've created a table ,like this:
>
> CREATE TABLE auxiliar
> (
> ano integer,
> codigodc character varying,
> id character varying,
> concat_id character varying NOT NULL,
> CONSTRAINT concat PRIMARY KEY (concat_id);
>
> Now i want to insert values on concat_id resulting from a function
> called "concat_id"
>
> INSERT INTO concat_id
> SELECT(concat_id) FROM auxiliar ;
insert has a syntax: INSERT INTO <tablename>
function call has a syntax funcname(parameters)
so if I would to fill table auxiliar from some function, then I'll use
a statement
INSERT INTO auxilar
SELECT * FROM funcname(..)
Regards
Pavel Stehule
>
> I get "error null value in column"concat_id" violatres not null
> constraint
>
>
>
> Could anyone tell me what am i doing wrong?
>
> Ana
>
>
>
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michele Petrazzo - Unipex | 2010-11-26 11:39:18 | group by hour + distinct |
Previous Message | Ana Louro | 2010-11-25 15:58:25 | error null value in column" concat_id" violates not-null constraint |