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: (view raw or whole thread)
Lists: pgsql-novice

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


And is the same for null value


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-2015 The PostgreSQL Global Development Group