pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedAnother Date question
4+ messages / 3 participants
[nested] [flat]
* Another Date question
@ 1999-12-03 03:56 Andy Lewis <alewis@roundnoon.com>
1999-12-03 06:13 ` Re: [SQL] Another Date question kaiq@realtyideas.com
1999-12-03 08:32 ` Re: [SQL] Another Date question Stoyan Genov <genov@digsys.bg>
0 siblings, 2 replies; 4+ messages in thread
From: Andy Lewis @ 1999-12-03 03:56 UTC (permalink / raw)
To: pgsql-sql
Hello All!
I'd like to create a table with a datetime field that defaults to +60
days.
mydate datetime default 'now() +@60 days',
...
Doesn't seem to work.
What am I missing?
Thanks
Andy
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] Another Date question
1999-12-03 03:56 Another Date question Andy Lewis <alewis@roundnoon.com>
@ 1999-12-03 06:13 ` kaiq@realtyideas.com
1 sibling, 0 replies; 4+ messages in thread
From: kaiq@realtyideas.com @ 1999-12-03 06:13 UTC (permalink / raw)
To: Andy Lewis <alewis@roundnoon.com>; +Cc: pgsql-sql
your may need to make a simple function. see function in doc.
On Thu, 2 Dec 1999, Andy Lewis wrote:
> Hello All!
>
> I'd like to create a table with a datetime field that defaults to +60
> days.
>
> mydate datetime default 'now() +@60 days',
> ...
>
> Doesn't seem to work.
>
> What am I missing?
>
> Thanks
>
> Andy
>
>
> ************
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] Another Date question
1999-12-03 03:56 Another Date question Andy Lewis <alewis@roundnoon.com>
@ 1999-12-03 08:32 ` Stoyan Genov <genov@digsys.bg>
1999-12-03 14:04 ` Re: [SQL] Another Date question Andy Lewis <alewis@roundnoon.com>
1 sibling, 1 reply; 4+ messages in thread
From: Stoyan Genov @ 1999-12-03 08:32 UTC (permalink / raw)
To: Andy Lewis <alewis@roundnoon.com>; +Cc: pgsql-sql
Hi,
No need of functions. You can do it like this:
CREATE TABLE mytable (mydate datetime DEFAULT now() + '@60 days');
Regards,
Stoyan Genov
> Hello All!
>
> I'd like to create a table with a datetime field that defaults to +60
> days.
>
> mydate datetime default 'now() +@60 days',
> ...
>
> Doesn't seem to work.
>
> What am I missing?
>
> Thanks
>
> Andy
>
>
> ************
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] Another Date question
1999-12-03 03:56 Another Date question Andy Lewis <alewis@roundnoon.com>
1999-12-03 08:32 ` Re: [SQL] Another Date question Stoyan Genov <genov@digsys.bg>
@ 1999-12-03 14:04 ` Andy Lewis <alewis@roundnoon.com>
0 siblings, 0 replies; 4+ messages in thread
From: Andy Lewis @ 1999-12-03 14:04 UTC (permalink / raw)
To: Stoyan Genov <genov@digsys.bg>; +Cc: pgsql-sql
I knew I was close, this example should be used in the documentation. I'd
certainly be helpful!
Thanks.
Andy
On Fri, 3 Dec 1999, Stoyan Genov wrote:
> Hi,
> No need of functions. You can do it like this:
>
> CREATE TABLE mytable (mydate datetime DEFAULT now() + '@60 days');
>
> Regards,
> Stoyan Genov
>
> > Hello All!
> >
> > I'd like to create a table with a datetime field that defaults to +60
> > days.
> >
> > mydate datetime default 'now() +@60 days',
> > ...
> >
> > Doesn't seem to work.
> >
> > What am I missing?
> >
> > Thanks
> >
> > Andy
> >
> >
> > ************
> >
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~1999-12-03 14:04 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-12-03 03:56 Another Date question Andy Lewis <alewis@roundnoon.com>
1999-12-03 06:13 ` kaiq@realtyideas.com
1999-12-03 08:32 ` Stoyan Genov <genov@digsys.bg>
1999-12-03 14:04 ` Andy Lewis <alewis@roundnoon.com>
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