pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
default value
2+ messages / 2 participants
[nested] [flat]

* default value
@ 2003-06-12 12:53  Nathalie Boulos <nathalieboulos@hotmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Nathalie Boulos @ 2003-06-12 12:53 UTC (permalink / raw)
  To: pgsql-admin

Hi,

i have a problem with the default value:

When i insert a value into a field in the table directly, all the other 
fields take their default values normaly, but the problem is if i insert 
into the rule and not into the table, all the fields who has default values 
do not take them. those fields remains empty.

So the default value does not work if i insert into a rule ???

I would greatly appreciate any feedback

Regards

Nathalie

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: default value
@ 2003-06-12 13:47  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Nathalie Boulos <nathalieboulos@hotmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2003-06-12 13:47 UTC (permalink / raw)
  To: Nathalie Boulos <nathalieboulos@hotmail.com>; +Cc: pgsql-admin

"Nathalie Boulos" <nathalieboulos@hotmail.com> writes:
> When i insert a value into a field in the table directly, all the other 
> fields take their default values normaly, but the problem is if i insert 
> into the rule and not into the table, all the fields who has default values 
> do not take them. those fields remains empty.
> So the default value does not work if i insert into a rule ???

A rule has its own defaults --- set them with ALTER TABLE rule SET DEFAULT.

(IIRC this works since about 7.2; it won't work on old Postgresen.)

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-06-12 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-06-12 12:53 default value Nathalie Boulos <nathalieboulos@hotmail.com>
2003-06-12 13:47 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox