Re: [HACKERS] Ignored PostgreSQL SET command

From: Date: Tue, 02 Jan 2001 07:59:26 +0000
Subject: Re: [HACKERS] Ignored PostgreSQL SET command
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32332@lists.php.net to get a copy of this message
"Patrick Dunford" wrote: >I have a line in a PHP script that looks like this: > > $set=pg_exec($dbconn, "SET DATESTYLE TO 'European'"); //Set date format > >Since my ISP updated their server, this appears to be ignored as pgsql >always returns dates in ISO format. > >1. What is the default format of dates returned that I can ALWAYS rely on? From release 7, the default format is ISO: yyyy-mm-dd >2. Why is the command ignored? European has no meaning with the ISO datestyle. To get normal European dates, do this SET command: SET DATESTYLE TO 'Postgres,European' -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47 GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Verily, verily, I say unto you, He that heareth my word, and believeth on him that sent me, hath everlasting life, and shall not come into condemnation; but is passed from death unto life." John 5:24

« previous php.general (#32332) next »