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

re : default value not working?

From: <pejac(at)altern(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: re : default value not working?
Date: 2001-05-07 15:36:57
Message-ID: 200105071542.f47Fg0A50318@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-novice
Hi,

No default values works, but default values works
only if no value( no '' or null ) was getting to this rows ...
example :

create table test ( name varchar(1) default 'N',id integer)

# we insert values except in name column
insert into test(id) values(12);

select * from test

N 12


insert into test values('',13);
select * from test

  13

And is the same for null value


Cheers,

PEJAC Pascal




pgsql-novice by date

Next:From: Tom LaneDate: 2001-05-07 15:39:21
Subject: Re: default value not working?
Previous:From: Michael R. JinksDate: 2001-05-07 15:16:56
Subject: Re: Install of postgresql

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