Gonzo,
> > I'm trying to find a pgSQL source that documents the Non-Standard
> > pgSQL stuff, the stuff that will break when attempting to execute
> > against mySQL/Oracle/MSSQLServer etc...
Almost anything you port will break MS SQL Server (7.0 and 6.5, anyway).
SQL Server is so far off the ANS
Gonzo Rock writes:
> I'm trying to find a pgSQL source that documents the Non-Standard
> pgSQL stuff, the stuff that will break when attempting to execute
> against mySQL/Oracle/MSSQLServer etc...
While it would be an appreciated effort to create such a document (and we
already try to document s
On Thu, 31 May 2001 17:24:54 + (UTC), [EMAIL PROTECTED] (Mark)
wrote:
>
>How does one perform date manipulation within SQL? For example, SQL
>Server has a dateadd() function that takes a date part, scalar, and the
>date to manipulate.
>
>I have a query that determines the number of days that
Select now() + 7;
-Original Message-
From: john whale [SMTP:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 10:30 AM
To: '[EMAIL PROTECTED]'
Subject:DATE
PLEASE ADVISE HOW I SHOULD ALTER THE COMMAND:
<$NOW;DD;>
TO GIVE ME A DATE THAT IS X DAYS FORWARD
ie: I
Andreas Tille wrote:
>
> On Fri, 25 Aug 2000, Tom Lane wrote:
>
> > I think you are getting burnt by premature constant folding --- see
> > nearby discussion of how to define a column default that gives the
> > time of insertion. You need to write this as
> > NEW.ChangedAt := now();
> >
On Fri, 25 Aug 2000, hlefebvre wrote:
> Tom Lane wrote:
> > NEW.ChangedAt := now();
> > to prevent the system from reducing timestamp('now') to a constant
> > when the function is first executed.
> >
> > regards, tom lane
> yep you're right :
You both are comple
Tom Lane wrote:
>
> Andreas Tille <[EMAIL PROTECTED]> writes:
> >> NEW.ChangedAt := timestamp(''now'');
>
> > This avoids the error message, but doesn't have any effect to the value
> > of ChangedAt. It just remains the same as CreatedAt :-(.
>
> I think you are getting burnt by premature co
On Fri, 25 Aug 2000, Tom Lane wrote:
> I think you are getting burnt by premature constant folding --- see
> nearby discussion of how to define a column default that gives the
> time of insertion. You need to write this as
> NEW.ChangedAt := now();
> to prevent the system from reducing tim
Andreas Tille <[EMAIL PROTECTED]> writes:
>> NEW.ChangedAt := timestamp(''now'');
> This avoids the error message, but doesn't have any effect to the value
> of ChangedAt. It just remains the same as CreatedAt :-(.
I think you are getting burnt by premature constant folding --- see
nearby discu
Andreas Tille wrote:
>
> On Fri, 25 Aug 2000, hlefebvre wrote:
>
> > No I suppose that the problem is the identifier "changedat" is unknown.
> >
> > You must probably prefix it : NEW.changedat
> >
> > CREATE FUNCTION changed_at_timestamp() RETURNS OPAQUE AS '
> > BEGIN
> > NEW.C
On Fri, 25 Aug 2000, hlefebvre wrote:
> No I suppose that the problem is the identifier "changedat" is unknown.
>
> You must probably prefix it : NEW.changedat
>
> CREATE FUNCTION changed_at_timestamp() RETURNS OPAQUE AS '
> BEGIN
> NEW.ChangedAt := timestamp(''now'');
>
Andreas Tille wrote:
>
> On Wed, 23 Aug 2000, hlefebvre wrote:
>
> > Yes. The keywords NEW / OLD are available only in triggers
> > see
> > http://www.postgresql.org/users-lounge/docs/7.0/user/c40874113.htm#AEN4286
> Well, I believe that, but
>
> CREATE FUNCTION changed_at_timestamp() RETURNS
On Wed, 23 Aug 2000, hlefebvre wrote:
> Yes. The keywords NEW / OLD are available only in triggers
> see
> http://www.postgresql.org/users-lounge/docs/7.0/user/c40874113.htm#AEN4286
Well, I believe that, but
CREATE FUNCTION changed_at_timestamp() RETURNS OPAQUE AS '
BEGIN
ChangedAt
Andreas Tille <[EMAIL PROTECTED]> writes:
> On Wed, 23 Aug 2000, hlefebvre wrote:
>> create table mytable( CreateDate timestamp default timestamp('now'),
>> );
> I've done a pg_dump and there this line was transformed to:
> "createdat" timestamp DEFAULT '23.08.2000 15:35:16.00 CEST'::"t
Andreas Tille wrote:
> I tried:
>
> web=# CREATE FUNCTION changed_at_timestamp () RETURNS OPAQUE AS '
> web'# BEGIN
> web'# ChangeDate := timestamp(''now'');
> web'# RETURN NEW;
> web'# END;
> web'# ' LANGUAGE 'plpgsql';
> CREATE
> web=# select changed_at_timestamp () ;
On Wed, 23 Aug 2000, hlefebvre wrote:
> create table mytable( CreateDate timestamp default timestamp('now'),
> );
I've done a pg_dump and there this line was transformed to:
"createdat" timestamp DEFAULT '23.08.2000 15:35:16.00 CEST'::"timestamp",
I'm afraid if I ever should use this
On Wed, 23 Aug 2000, hlefebvre wrote:
> create table mytable( CreateDate timestamp default timestamp('now'),
> );
Thanks, this works.
> CREATE FUNCTION myt_stamp () RETURNS OPAQUE AS
> BEGIN
> ChangeDate := timestamp(''now'');
> RETURN NEW;
> END;
> ' LANGUAGE 'pl
17 matches
Mail list logo