| From: | Howie <caffeine(at)toodarkpark(dot)org> |
|---|---|
| To: | Roberto Joao Lopes Garcia <roberto(at)mha(dot)com(dot)br> |
| Cc: | pgsql-sql(at)postgreSQL(dot)org |
| Subject: | Re: [SQL] DEFAULT TEXT 'now' |
| Date: | 1999-03-24 07:09:38 |
| Message-ID: | Pine.LNX.3.96.990324020819.12713F-100000@brap-eth0.toodarkpark.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Tue, 23 Mar 1999, Roberto Joao Lopes Garcia wrote:
> Hi
>
> Im have a table like bellow:
>
> CREATE TABLE conex (
> id int4 PRIMARY KEY DEFAULT NEXTVAL('seq_conex'),
>
> inicio datetime DEFAULT TEXT 'now',
> ultimo datetime DEFAULT TEXT
> 'now',
> .
> .
> .
> )
>
> insert into conex (ip) values(200.200.200.200)
>
> Will result every time the same data and time for inicio and ultimo!
>
> I want to insert the current date and time. Is that code correct and the
> result a bug???
> Is there an way to make the DEFAULT work???
try:
...
inicido DATETIME DEFAULT NOW(),
ultimo DATETIME DEFAULT NOW(),
...
---
Howie <caffeine(at)toodarkpark(dot)org> URL: http://www.toodarkpark.org
"You can change the world with a bullet in the right place"
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Anatoly K. Lasareff | 1999-03-24 07:10:42 | Re: [SQL] DEFAULT TEXT 'now' |
| Previous Message | Roberto Joao Lopes Garcia | 1999-03-23 18:58:24 | DEFAULT TEXT 'now' |