Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-12-02 11:49:02

jayp
New Member
Registered: 2005-12-01
Posts: 2

Re: txp version supporting postgre in the near future?

hi
there were some mysql functions left..
its patch for current svn snapshot(revision 1126)
http://xbsd.1.vg/files/diff-pgsql.txt

Offline

#14 2005-12-02 22:57:19

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: txp version supporting postgre in the near future?

Thanks, nice work.

One question: is there a particular reason to use set_client_encoding() instead of SET NAMES? They both do the same thing, as far as I can see, and SET NAMES is standard sql.


Alex

Offline

#15 2005-12-03 01:39:23

jayp
New Member
Registered: 2005-12-01
Posts: 2

Re: txp version supporting postgre in the near future?

didn’t knew it was possible to use ‘set names’ in pgsql ;) (i barely know sql, just stuck with pgsql at the moment.)
btw, to use SET NAMES, you have to enclose charset with quote.
SET NAMES ‘utf8’;

Last edited by jayp (2005-12-03 01:40:47)

Offline

#16 2005-12-03 03:44:07

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: txp version supporting postgre in the near future?

btw, to use SET NAMES, you have to enclose charset with quote.

Thanks, I’ll fix that up.

Pedro has some big changes for mdb.php almost ready to go, so I’ll wait until those are in before merging these changes.


Alex

Offline

#17 2006-01-08 02:41:35

phretor
New Member
Registered: 2006-01-08
Posts: 3

Re: txp version supporting postgre in the near future?

I report TXP crockery to approximately work, with warnings and some errors, on my textbox: I currently tested it on Mac OS X.3.9 equipped with PostgreSQL 7.4.1 (from DarwinPorts), Apache 1.3.33 (packaged by Apple) and PHP 4.3.11 (packaged by www.entropy.ch, Release 1).

I have a lot of output that could be useful for debugging purposes, where should I submit it?

Cheers,
Federico phretor Maggi

Last edited by phretor (2006-01-08 03:10:47)

Offline

#18 2006-01-08 17:09:19

phretor
New Member
Registered: 2006-01-08
Posts: 3

Re: txp version supporting postgre in the near future?

Guys, I got a really bad news :-)

I am playing a bit with crockery trying to fix warnings/errors using ‘pg’ DB. The bad news is that the entire application uses ‘user’ as the second column name of ‘txp_prefs_user’ table AND the word ‘user’ is reserved in PgSQL.

Someone on #postgresql @ Freenode suggested to escape (with double quotes) all reserved words (according to postgresql reserved words table). My suggestion is to change the column name :-)

lemme know

Offline

#19 2006-01-09 02:02:22

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: txp version supporting postgre in the near future?

Curious, I’ve tested it on several machines without running into problems with the ‘user’ table.

Escaping column names isn’t easy because MySQL doesn’t recognize the ansi-standard quote syntax.


Alex

Offline

#20 2006-01-09 07:44:24

phretor
New Member
Registered: 2006-01-08
Posts: 3

Re: txp version supporting postgre in the near future?

> Curious, I’ve tested it on several machines without running into problems with the ‘user’ table.

Instead it create several problems with columns named with reserved words on PgSQL, by now it can be solved by manually escaping such words. For the future either (1) a middle-level filter should be implemented to filter-and-quote bad columns names or (2) all columns name must be quoted.

As a side note, db_affected_rows() implementation is broken.

I’d like to collaborate for building a sane port to PgSQL so, consider me :-)

Cheers,

Offline

Board footer

Powered by FluxBB