<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: [Update] PG4WP 1.1.0rc2</title>
	<atom:link href="http://www.hawkix.net/lang/en/2010/01/pg4wp-1-1-0rc2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hawkix.net/lang/en/2010/01/pg4wp-1-1-0rc2</link>
	<description>Développement PHP / Conseils en informatique / Hébergement et maintenance de sites Web</description>
	<lastBuildDate>Mon, 12 Jul 2010 19:37:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Boris HUISGEN</title>
		<link>http://www.hawkix.net/lang/en/2010/01/pg4wp-1-1-0rc2/comment-page-1/#comment-224</link>
		<dc:creator>Boris HUISGEN</dc:creator>
		<pubDate>Mon, 01 Feb 2010 00:59:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.hawkix.net/?p=241#comment-224</guid>
		<description>Comme çà le patch c&#039;est mieux :

--- driver_pgsql.php.orig	2010-02-01 01:38:05.000000000 +0100
+++ driver_pgsql.php	2010-02-01 01:49:18.000000000 +0100
@@ -134,10 +134,10 @@
 			$sql = preg_replace( $pattern, &#039;ROUND(DATE_PART(\&#039;epoch\&#039;,$1))&#039;, $sql);
 			
 			$date_funcs = array(
-				&#039;YEAR(&#039;			=&gt; &#039;EXTRACT(YEAR FROM &#039;,
-				&#039;MONTH(&#039;		=&gt; &#039;EXTRACT(MONTH FROM &#039;,
 				&#039;DAY(&#039;			=&gt; &#039;EXTRACT(DAY FROM &#039;,
-				&#039;DAYOFMONTH(&#039;	=&gt; &#039;EXTRACT(DAY FROM &#039;,
+				&#039;DAYOFMONTH(&#039;		=&gt; &#039;EXTRACT(DAY FROM &#039;,
+				&#039;MONTH(&#039;                =&gt; &#039;EXTRACT(MONTH FROM &#039;,
+				&#039;YEAR(&#039;                 =&gt; &#039;EXTRACT(YEAR FROM &#039;,
 			);
 			
 			$sql = str_replace( &#039;ORDER BY post_date DESC&#039;, &#039;ORDER BY YEAR(post_date) DESC, MONTH(post_date) DESC&#039;, $sql);
@@ -166,6 +166,9 @@
 			$sql = str_replace( &#039;link_url o_url&#039;, &#039;link_url AS o_url&#039;, $sql);
 			$sql = str_replace( &#039;link_name o_name&#039;, &#039;link_name AS o_name&#039;, $sql);
 			$sql = str_replace( &#039;link_description o_desc&#039;, &#039;link_description AS o_desc&#039;, $sql);
+
+                        // HB : timestamp fix for permalinks
+                        $sql = str_replace( &quot;post_date_gmt &gt; 1970&quot;, &quot;post_date_gmt &gt; to_timestamp (&#039;1970&#039;)&quot;, $sql);
 		} // SELECT
 		elseif( 0 === strpos($sql, &#039;UPDATE&#039;))
 		{</description>
		<content:encoded><![CDATA[<p>Comme çà le patch c&#8217;est mieux :</p>
<p>&#8212; driver_pgsql.php.orig	2010-02-01 01:38:05.000000000 +0100<br />
+++ driver_pgsql.php	2010-02-01 01:49:18.000000000 +0100<br />
@@ -134,10 +134,10 @@<br />
 			$sql = preg_replace( $pattern, &#8216;ROUND(DATE_PART(\&#8217;epoch\&#8217;,$1))&#8217;, $sql);</p>
<p> 			$date_funcs = array(<br />
-				&#8216;YEAR(&#8216;			=&gt; &#8216;EXTRACT(YEAR FROM &#8216;,<br />
-				&#8216;MONTH(&#8216;		=&gt; &#8216;EXTRACT(MONTH FROM &#8216;,<br />
 				&#8216;DAY(&#8216;			=&gt; &#8216;EXTRACT(DAY FROM &#8216;,<br />
-				&#8216;DAYOFMONTH(&#8216;	=&gt; &#8216;EXTRACT(DAY FROM &#8216;,<br />
+				&#8216;DAYOFMONTH(&#8216;		=&gt; &#8216;EXTRACT(DAY FROM &#8216;,<br />
+				&#8216;MONTH(&#8216;                =&gt; &#8216;EXTRACT(MONTH FROM &#8216;,<br />
+				&#8216;YEAR(&#8216;                 =&gt; &#8216;EXTRACT(YEAR FROM &#8216;,<br />
 			);</p>
<p> 			$sql = str_replace( &#8216;ORDER BY post_date DESC&#8217;, &#8216;ORDER BY YEAR(post_date) DESC, MONTH(post_date) DESC&#8217;, $sql);<br />
@@ -166,6 +166,9 @@<br />
 			$sql = str_replace( &#8216;link_url o_url&#8217;, &#8216;link_url AS o_url&#8217;, $sql);<br />
 			$sql = str_replace( &#8216;link_name o_name&#8217;, &#8216;link_name AS o_name&#8217;, $sql);<br />
 			$sql = str_replace( &#8216;link_description o_desc&#8217;, &#8216;link_description AS o_desc&#8217;, $sql);<br />
+<br />
+                        // HB : timestamp fix for permalinks<br />
+                        $sql = str_replace( &#8220;post_date_gmt &gt; 1970&#8243;, &#8220;post_date_gmt &gt; to_timestamp (&#8216;1970&#8242;)&#8221;, $sql);<br />
 		} // SELECT<br />
 		elseif( 0 === strpos($sql, &#8216;UPDATE&#8217;))<br />
 		{</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris HUISGEN</title>
		<link>http://www.hawkix.net/lang/en/2010/01/pg4wp-1-1-0rc2/comment-page-1/#comment-223</link>
		<dc:creator>Boris HUISGEN</dc:creator>
		<pubDate>Mon, 01 Feb 2010 00:58:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.hawkix.net/?p=241#comment-223</guid>
		<description>Oui, je pense que c&#039;est l&#039;import wordpress qui ne reprend pas comme il faut les données... Je te remonte d&#039;autres pépins liés aux permaliens de la forme&#039;/%year%/%monthnum%/%day%/%postname%/&#039;. Par ex l&#039;URL http://dev.blog.hbis.fr/2010/01/26/roundcube-rc_vacation_0-3-2/ ne fonctionne pas :

Error running :
SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM wp_posts WHERE post_date_gmt &gt; 1970
---- converted to ----
SELECT EXTRACT(YEAR FROM min(post_date_gmt)) AS firstyear, EXTRACT(YEAR FROM max(post_date_gmt)) AS lastyear FROM wp_posts WHERE post_date_gmt &gt; 1970

Il faut caster en timestamp donc un to_timestamp (&#039;1970&#039;) fonctionnerait. 
=&gt; $sql = str_replace( &quot;WHERE post_date_gmt &gt; 1970&quot;, &quot;WHERE post_date_gmt &gt; to_timestamp (&#039;1970&#039;)&quot;, $sql);

Error running :
SELECT &quot;ID&quot; FROM wp_posts WHERE post_name LIKE &#039;roundcube-rc_vacation_0-3-2%&#039; AND YEAR(post_date) = 2010 AND MONTH(post_date) = 1 AND DAYOFMONTH(post_date) = 26 AND post_status = &#039;publish&#039;
---- converted to ----
SELECT &quot;ID &quot; FROM wp_posts WHERE post_name ILIKE &#039;roundcube-rc_vacation_0-3-2%&#039; AND EXTRACT(YEAR FROM post_date) = 2010 AND EXTRACT(MONTH FROM post_date) = 1 AND DAYOFEXTRACT(MONTH FROM post_date) = 26 AND post_status = &#039;publish&#039;
----
ERROR:  syntax error at or near &quot;FROM&quot;
LINE 1: ...(MONTH FROM post_date) = 1 AND DAYOFEXTRACT(MONTH FROM post_...

Ton code gère cela, mais le remplacement est mal ordonné.

Bref, voici mon patch :

--- driver_pgsql.php	2010-02-01 01:49:18.000000000 +0100
+++ driver_pgsql.php.orig	2010-02-01 01:38:05.000000000 +0100
@@ -134,10 +134,10 @@
 			$sql = preg_replace( $pattern, &#039;ROUND(DATE_PART(\&#039;epoch\&#039;,$1))&#039;, $sql);
 			
 			$date_funcs = array(
+				&#039;YEAR(&#039;			=&gt; &#039;EXTRACT(YEAR FROM &#039;,
+				&#039;MONTH(&#039;		=&gt; &#039;EXTRACT(MONTH FROM &#039;,
 				&#039;DAY(&#039;			=&gt; &#039;EXTRACT(DAY FROM &#039;,
-				&#039;DAYOFMONTH(&#039;		=&gt; &#039;EXTRACT(DAY FROM &#039;,
-				&#039;MONTH(&#039;                =&gt; &#039;EXTRACT(MONTH FROM &#039;,
-				&#039;YEAR(&#039;                 =&gt; &#039;EXTRACT(YEAR FROM &#039;,
+				&#039;DAYOFMONTH(&#039;	=&gt; &#039;EXTRACT(DAY FROM &#039;,
 			);
 			
 			$sql = str_replace( &#039;ORDER BY post_date DESC&#039;, &#039;ORDER BY YEAR(post_date) DESC, MONTH(post_date) DESC&#039;, $sql);
@@ -166,9 +166,6 @@
 			$sql = str_replace( &#039;link_url o_url&#039;, &#039;link_url AS o_url&#039;, $sql);
 			$sql = str_replace( &#039;link_name o_name&#039;, &#039;link_name AS o_name&#039;, $sql);
 			$sql = str_replace( &#039;link_description o_desc&#039;, &#039;link_description AS o_desc&#039;, $sql);
-
-                        // HB : timestamp fix for permalinks
-                        $sql = str_replace( &quot;post_date_gmt &gt; 1970&quot;, &quot;post_date_gmt &gt; to_timestamp (&#039;1970&#039;)&quot;, $sql);
 		} // SELECT
 		elseif( 0 === strpos($sql, &#039;UPDATE&#039;))
 		{

A toi de voir si y a plus joli.

Peux-tu m&#039;envoyer un mail pour que je puisse t&#039;envoyer directement tout ce que je débusque ?</description>
		<content:encoded><![CDATA[<p>Oui, je pense que c&#8217;est l&#8217;import wordpress qui ne reprend pas comme il faut les données&#8230; Je te remonte d&#8217;autres pépins liés aux permaliens de la forme&#8217;/%year%/%monthnum%/%day%/%postname%/&#8217;. Par ex l&#8217;URL <a href="http://dev.blog.hbis.fr/2010/01/26/roundcube-rc_vacation_0-3-2/" rel="nofollow">http://dev.blog.hbis.fr/2010/01/26/roundcube-rc_vacation_0-3-2/</a> ne fonctionne pas :</p>
<p>Error running :<br />
SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM wp_posts WHERE post_date_gmt &gt; 1970<br />
&#8212;- converted to &#8212;-<br />
SELECT EXTRACT(YEAR FROM min(post_date_gmt)) AS firstyear, EXTRACT(YEAR FROM max(post_date_gmt)) AS lastyear FROM wp_posts WHERE post_date_gmt &gt; 1970</p>
<p>Il faut caster en timestamp donc un to_timestamp (&#8216;1970&#8242;) fonctionnerait.<br />
=&gt; $sql = str_replace( &#8220;WHERE post_date_gmt &gt; 1970&#8243;, &#8220;WHERE post_date_gmt &gt; to_timestamp (&#8216;1970&#8242;)&#8221;, $sql);</p>
<p>Error running :<br />
SELECT &#8220;ID&#8221; FROM wp_posts WHERE post_name LIKE &#8217;roundcube-rc_vacation_0-3-2%&#8217; AND YEAR(post_date) = 2010 AND MONTH(post_date) = 1 AND DAYOFMONTH(post_date) = 26 AND post_status = &#8216;publish&#8217;<br />
&#8212;- converted to &#8212;-<br />
SELECT &#8220;ID &#8221; FROM wp_posts WHERE post_name ILIKE &#8217;roundcube-rc_vacation_0-3-2%&#8217; AND EXTRACT(YEAR FROM post_date) = 2010 AND EXTRACT(MONTH FROM post_date) = 1 AND DAYOFEXTRACT(MONTH FROM post_date) = 26 AND post_status = &#8216;publish&#8217;<br />
&#8212;-<br />
ERROR:  syntax error at or near &#8220;FROM&#8221;<br />
LINE 1: &#8230;(MONTH FROM post_date) = 1 AND DAYOFEXTRACT(MONTH FROM post_&#8230;</p>
<p>Ton code gère cela, mais le remplacement est mal ordonné.</p>
<p>Bref, voici mon patch :</p>
<p>&#8212; driver_pgsql.php	2010-02-01 01:49:18.000000000 +0100<br />
+++ driver_pgsql.php.orig	2010-02-01 01:38:05.000000000 +0100<br />
@@ -134,10 +134,10 @@<br />
 			$sql = preg_replace( $pattern, &#8216;ROUND(DATE_PART(\&#8217;epoch\&#8217;,$1))&#8217;, $sql);</p>
<p> 			$date_funcs = array(<br />
+				&#8216;YEAR(&#8216;			=&gt; &#8216;EXTRACT(YEAR FROM &#8216;,<br />
+				&#8216;MONTH(&#8216;		=&gt; &#8216;EXTRACT(MONTH FROM &#8216;,<br />
 				&#8216;DAY(&#8216;			=&gt; &#8216;EXTRACT(DAY FROM &#8216;,<br />
-				&#8216;DAYOFMONTH(&#8216;		=&gt; &#8216;EXTRACT(DAY FROM &#8216;,<br />
-				&#8216;MONTH(&#8216;                =&gt; &#8216;EXTRACT(MONTH FROM &#8216;,<br />
-				&#8216;YEAR(&#8216;                 =&gt; &#8216;EXTRACT(YEAR FROM &#8216;,<br />
+				&#8216;DAYOFMONTH(&#8216;	=&gt; &#8216;EXTRACT(DAY FROM &#8216;,<br />
 			);</p>
<p> 			$sql = str_replace( &#8216;ORDER BY post_date DESC&#8217;, &#8216;ORDER BY YEAR(post_date) DESC, MONTH(post_date) DESC&#8217;, $sql);<br />
@@ -166,9 +166,6 @@<br />
 			$sql = str_replace( &#8216;link_url o_url&#8217;, &#8216;link_url AS o_url&#8217;, $sql);<br />
 			$sql = str_replace( &#8216;link_name o_name&#8217;, &#8216;link_name AS o_name&#8217;, $sql);<br />
 			$sql = str_replace( &#8216;link_description o_desc&#8217;, &#8216;link_description AS o_desc&#8217;, $sql);<br />
-<br />
-                        // HB : timestamp fix for permalinks<br />
-                        $sql = str_replace( &#8220;post_date_gmt &gt; 1970&#8243;, &#8220;post_date_gmt &gt; to_timestamp (&#8216;1970&#8242;)&#8221;, $sql);<br />
 		} // SELECT<br />
 		elseif( 0 === strpos($sql, &#8216;UPDATE&#8217;))<br />
 		{</p>
<p>A toi de voir si y a plus joli.</p>
<p>Peux-tu m&#8217;envoyer un mail pour que je puisse t&#8217;envoyer directement tout ce que je débusque ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hawk__</title>
		<link>http://www.hawkix.net/lang/en/2010/01/pg4wp-1-1-0rc2/comment-page-1/#comment-220</link>
		<dc:creator>Hawk__</dc:creator>
		<pubDate>Sat, 30 Jan 2010 23:58:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.hawkix.net/?p=241#comment-220</guid>
		<description>En fait, l&#039;import xml ne fait pas partie des éléments prioritaires pour l&#039;instant, ce qui signifie simplement que je n&#039;ai jamais testé cette fonctionnalité avec PG4WP.
Tout mon travail est concentré sur l&#039;utilisation de Wordpress avec PostgreSQL à partir d&#039;une installation &quot;neuve&quot;, je suis conscient qu&#039;il y a un certain nombre de lacunes qui seront probablement réglées dans de futures versions.
Merci pour ces informations, elles me seront très utiles lorsque je me mettrais à travailler sur les mécanismes de migration :)</description>
		<content:encoded><![CDATA[<p>En fait, l&#8217;import xml ne fait pas partie des éléments prioritaires pour l&#8217;instant, ce qui signifie simplement que je n&#8217;ai jamais testé cette fonctionnalité avec PG4WP.<br />
Tout mon travail est concentré sur l&#8217;utilisation de Wordpress avec PostgreSQL à partir d&#8217;une installation &#8220;neuve&#8221;, je suis conscient qu&#8217;il y a un certain nombre de lacunes qui seront probablement réglées dans de futures versions.<br />
Merci pour ces informations, elles me seront très utiles lorsque je me mettrais à travailler sur les mécanismes de migration <img src='http://www.hawkix.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris HUISGEN</title>
		<link>http://www.hawkix.net/lang/en/2010/01/pg4wp-1-1-0rc2/comment-page-1/#comment-219</link>
		<dc:creator>Boris HUISGEN</dc:creator>
		<pubDate>Sat, 30 Jan 2010 20:04:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.hawkix.net/?p=241#comment-219</guid>
		<description>Après examen des tables, j&#039;ai remarqué que le champ &quot;comment_post_ID&quot; de ta table wp_comments n&#039;est pas initialisé, idem pour comment_count dans wp_posts. En les renseignant, les commentaires apparaissent. Avez-vous ce problème lors de l&#039;import XML ?</description>
		<content:encoded><![CDATA[<p>Après examen des tables, j&#8217;ai remarqué que le champ &#8220;comment_post_ID&#8221; de ta table wp_comments n&#8217;est pas initialisé, idem pour comment_count dans wp_posts. En les renseignant, les commentaires apparaissent. Avez-vous ce problème lors de l&#8217;import XML ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris HUISGEN</title>
		<link>http://www.hawkix.net/lang/en/2010/01/pg4wp-1-1-0rc2/comment-page-1/#comment-218</link>
		<dc:creator>Boris HUISGEN</dc:creator>
		<pubDate>Sat, 30 Jan 2010 17:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.hawkix.net/?p=241#comment-218</guid>
		<description>On peut enfin faire tourner wordpress sous postgres ! 

Je viens de tester la conversion de mon blog - http://blog.hbis.fr - l&#039;installation est OK, mais en tentant de faire un import XML de mes données, j&#039;ai remarqué qu&#039;aucun commentaire n&#039;était affiché alors qu&#039;ils sont bien dans la DB. Est-ce un problème lié à la DB initiale ou est-ce la conversion ? 

Voici ce que j&#039;ai dans le log de debug :

Error running :
DELETE FROM wp_postmeta WHERE meta_key = &#039;_thumbnail_id&#039; AND meta_value = 5
---- converted to ----
DELETE FROM wp_postmeta WHERE meta_key = &#039;_thumbnail_id&#039; AND meta_value = 5
----
ERROR:  operator does not exist: text = integer
LINE 1: ...postmeta WHERE meta_key = &#039;_thumbnail_id&#039; AND meta_value = 5
                                                                    ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
---------------------

Je vais pour l&#039;instant voir ce qui ne va pas en DB. Merci pour toute info à ce sujet.</description>
		<content:encoded><![CDATA[<p>On peut enfin faire tourner wordpress sous postgres ! </p>
<p>Je viens de tester la conversion de mon blog &#8211; <a href="http://blog.hbis.fr" rel="nofollow">http://blog.hbis.fr</a> &#8211; l&#8217;installation est OK, mais en tentant de faire un import XML de mes données, j&#8217;ai remarqué qu&#8217;aucun commentaire n&#8217;était affiché alors qu&#8217;ils sont bien dans la DB. Est-ce un problème lié à la DB initiale ou est-ce la conversion ? </p>
<p>Voici ce que j&#8217;ai dans le log de debug :</p>
<p>Error running :<br />
DELETE FROM wp_postmeta WHERE meta_key = &#8216;_thumbnail_id&#8217; AND meta_value = 5<br />
&#8212;- converted to &#8212;-<br />
DELETE FROM wp_postmeta WHERE meta_key = &#8216;_thumbnail_id&#8217; AND meta_value = 5<br />
&#8212;-<br />
ERROR:  operator does not exist: text = integer<br />
LINE 1: &#8230;postmeta WHERE meta_key = &#8216;_thumbnail_id&#8217; AND meta_value = 5<br />
                                                                    ^<br />
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Je vais pour l&#8217;instant voir ce qui ne va pas en DB. Merci pour toute info à ce sujet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lipuringas</title>
		<link>http://www.hawkix.net/lang/en/2010/01/pg4wp-1-1-0rc2/comment-page-1/#comment-212</link>
		<dc:creator>lipuringas</dc:creator>
		<pubDate>Wed, 27 Jan 2010 21:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.hawkix.net/?p=241#comment-212</guid>
		<description>Great work! Thanks for the update.</description>
		<content:encoded><![CDATA[<p>Great work! Thanks for the update.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DFectuoso</title>
		<link>http://www.hawkix.net/lang/en/2010/01/pg4wp-1-1-0rc2/comment-page-1/#comment-209</link>
		<dc:creator>DFectuoso</dc:creator>
		<pubDate>Tue, 26 Jan 2010 23:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.hawkix.net/?p=241#comment-209</guid>
		<description>Nevermind, found it on the Wordpress plugin site, under &quot;other versions&quot;. I hope to have some feedback about using this RC on other instalation(and 2.9.1 upgrade)!</description>
		<content:encoded><![CDATA[<p>Nevermind, found it on the Wordpress plugin site, under &#8220;other versions&#8221;. I hope to have some feedback about using this RC on other instalation(and 2.9.1 upgrade)!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DFectuoso</title>
		<link>http://www.hawkix.net/lang/en/2010/01/pg4wp-1-1-0rc2/comment-page-1/#comment-208</link>
		<dc:creator>DFectuoso</dc:creator>
		<pubDate>Tue, 26 Jan 2010 23:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.hawkix.net/?p=241#comment-208</guid>
		<description>But where can i download this version? Can&#039;t seem to find it =P</description>
		<content:encoded><![CDATA[<p>But where can i download this version? Can&#8217;t seem to find it =P</p>
]]></content:encoded>
	</item>
</channel>
</rss>
