Re: missed features and unhappy changes when pg 7.1->7.2

From: Jeff Davis <list-pgsql-general(at)empires(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: missed features and unhappy changes when pg 7.1->7.2
Date: 2002-09-20 10:47:25
Message-ID: 200209200347.25310.list-pgsql-general@empires.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Yep. Quik alter fixed all. But it costs me a lot nervos.:( Luckly I had
> spare way to store info in the file. So, do you know where to dig?8)

Sorry, I don't understand your question.

>
> > atttypmod attribute of the pg_attribute system catalog for the problem
> > attributes, thereby putting off my work a little longer ;)
> >
> > For the date thing, you can do:
> > SELECT datetime '01/01/01 01:01:01';
> > or SELECT datetime('01/01/01 01:01:01');
> > or SELECT timestamp '01/01/01 01:01:01';
> > /* the last one returns a timezonetz type though */
>
> Hm...I meant commands like this:
>
> "UPDATE ${acct_table1} SET AcctStopTime='%S',
> AcctSessionTime=\"interval\"(\"timestamp\"('%S') - AcctStartTime),
> AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay =
> %{Acct-Delay-Time} WHERE AcctSessionTime=NULL AND AcctStopTime=NULL AND
> NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime <= '%S';
>

The things I wrote above should work in the update statement as well.
timestamp is now a reserved word so you need to quote it to call the
function, but you can still use the casting version of it, or those other
things I mentioned up there. If you still have problems with the query let me
know. Try, for example, replacing "timestamp" with datetime in the query you
showed me.

Regards,
Jeff Davis

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2002-09-20 10:54:15 Re: PHP + PostgreSQL
Previous Message Jeff Davis 2002-09-20 10:42:44 Re: BYTEA