Re: PHP & PostgreSQL

From: Date: Mon, 30 Dec 2002 13:59:58 +0000
Subject: Re: PHP & PostgreSQL
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-129657@lists.php.net to get a copy of this message
On Mon, 30 Dec 2002 04:11:02 -0700, you wrote: >The things that bothered me the most: > >o Pg doesn't have DATE_FORMAT() to_char() accomplishes the same thing, for example: select to_char(lastlogin, 'FMMM-DD-YYYY FMHH:MI AM') as lastloginf from users; >, or the types SET and ENUM. I'm not sure what SET is, never used it, but ENUM is totally unnecessary in Postgres because it supports foreign keys. If you want a particular field to only allow ENUM('red', 'blue', 'green') then create a lookup table, insert these values into it, and then set up a foreign key. This is more standard anyway, and if you need to update the set there is no need to touch the database schema. >o Changing database structure is harder. With PG, I usually found it > easier to dump, edit, then reload the database to make changes I did > in MySQL with ALTER TABLE. True, changing schema is a major PITA with Postgres. My only real complaint about it, in fact...

« previous php.general (#129657) next »