Skip site navigation (1) Skip section navigation (2)

Re: Ignored PostgreSQL SET command

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: "Patrick Dunford" <pdunford(dot)webs(at)clear(dot)net(dot)nz>
Cc: pgsql-hackers(at)postgresql(dot)org, php-general(at)lists(dot)php(dot)net
Subject: Re: Ignored PostgreSQL SET command
Date: 2001-01-02 07:59:26
Message-ID: 200101020759.f027xTH18410@linda.lfix.co.uk (view raw or flat)
Thread:
Lists: pgsql-hackers
"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(dot)Elphick(at)lfix(dot)co(dot)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 



pgsql-hackers by date

Next:From: Alfred PerlsteinDate: 2001-01-02 08:02:31
Subject: Re: Assuming that TAS() will succeed the first time is verboten
Previous:From: Bruce MomjianDate: 2001-01-02 07:59:20
Subject: Re: Assuming that TAS() will succeed the first time is verboten

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group