set default: question

Поиск
Список
Период
Сортировка
От Marco Bomben
Тема set default: question
Дата
Msg-id y2vfbc4c2201004210821qbeebaad9wd74e6b5af74972d1@mail.gmail.com
обсуждение исходный текст
Ответы Re: set default: question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Dear all,
            I've started using postgresql this week and I found it awesome!
I've a problem in understanding the "SET DEFAULT" command.

fssr2db=# ALTER TABLE fssr2calibs ALTER COLUMN  intvbn SET DEFAULT 139; ALTER TABLE

but:
fssr2db=# SELECT tag, intvbn from   fssr2calibs
WHERE tag = '100421-154052' OR tag = '100302-161107';
      tag      | intvbn
---------------+--------
 100302-161107 |    139
 100421-154052 |

and
fssr2db=# \d fssr2calibs
                Table "public.fssr2calibs"
     Column      |          Type           |   Modifiers
-----------------+-------------------------+---------------
 tag             | character varying(13)   |
 module          | integer                 |
 sidetype        | polarity                |
 chipnum         | numofchip               |
 pomonechipnum   | pomonechip              |
 fssr2daqchipnum | fssr2daqchip            |
 tchip           | real                    |
 tpcb            | real                    |
 vmodule         | real                    |
 imodule         | real                    |
 peltierstatus   | boolean                 |
 vpeltier        | real                    |
 ipeltier        | real                    |
 nchips          | real                    |
 sensorstatus    | bit(1)[]                |
 sensortype      | character varying(120)  |
 shortdettype    | shortdet                |
 vbias           | real                    |
 leakagecurr     | real                    |
 maskedchans     | integer[]               |
 noise           | real                    |
 thrdisp         | real[]                  |
 disvtn          | integer                 |
 vth             | integer[]               |
 vmin            | integer                 |
 vmax            | integer                 |
 vstep           | integer                 |
 comments        | character varying(1000) |
 fanon           | integer                 |
 n2flux          | real                    |
 troom           | real                    |
 intvbn          | integer                 | default 139
 shpvbp2         | integer                 |
 shpvbp1         | integer                 |
 blrvbp1         | integer                 |
 shaping         | integer                 |
 highgain        | boolean                 | default false
 blr             | boolean    


So I do see the effects of SET DEFAULT on the table as a whole (through \d <table name>)
but not on each row (I set the value for some of them and for some not before using SET DEFAULT).

Is there any way to get the default value for each single row?
I'm using postgres 8.4.3.

Many thanks in advance,
                                     regards,
                                                   Marco Bomben

--
"Human existence is based upon two pillars: Compassion and knowledge.
Compassion without knowledge is ineffective; knowledge without compassion is inhuman."
(Victor Frederick Weisskopf)
----------------------------------------------
http://marco.bomben.googlepages.com/

В списке pgsql-novice по дате отправления:

Предыдущее
От: Ben Chobot
Дата:
Сообщение: Re: [GENERAL] Specific database vars, again...
Следующее
От: jr
Дата:
Сообщение: Re: PostgreSQL Book