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

Jeff Davis <list-pgsql-general@empires.org>

From: Jeff Davis <list-pgsql-general@empires.org>
To: pgsql-general@postgresql.org
Date: 2002-09-20T10:47:25Z
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