<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>hihn.org &#187; PostgreSQL</title>
	<atom:link href="http://hihn.org/tag/postgresql/feed/" rel="self" type="application/rss+xml" />
	<link>http://hihn.org</link>
	<description></description>
	<lastBuildDate>Sat, 26 Jun 2010 23:10:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>join-Statements mit Zend_DB</title>
		<link>http://hihn.org/2010/03/join-statements-mit-zend_db/</link>
		<comments>http://hihn.org/2010/03/join-statements-mit-zend_db/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 12:28:51 +0000</pubDate>
		<dc:creator>rh</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[zend-framework]]></category>

		<guid isPermaLink="false">https://hihn.org/?p=499</guid>
		<description><![CDATA[join-Statements mit Zend DB: /* * $db = a valid Zend_DB resource * table1: foo (short: t1) * table2: bar (short: t2) * columns: column1, column2, column3 */ $select = $db->select() ->from( array('t1' => 'foo'), // table name array('t1.column1', 't1.column2', 't1.column3')) // selected columns ->join( array('t2' => 'bar'), 't1.column1 = t2.column1') // JOIN bar t2 [...]]]></description>
			<content:encoded><![CDATA[<p>join-Statements mit <a href="http://framework.zend.com/manual/de/zend.db.html">Zend DB</a>:</p>
<pre>
/*
 * $db = a valid Zend_DB resource
 * table1: foo (short: t1)
 * table2: bar (short: t2)
 * columns: column1, column2, column3
 */

$select = $db->select()
	->from(	array('t1' => 'foo'), // table name
		array('t1.column1', 't1.column2', 't1.column3')) // selected columns
	->join(	array('t2' => 'bar'), 't1.column1 =  t2.column1') // JOIN bar t2 ON t1.column1 = t2.column1
	->where('t2.user_id = ?', $var) // WHERE t2.userid = '$var'
	->order('t1.column ASC'); // ORDER BY t1.column ASC
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hihn.org/2010/03/join-statements-mit-zend_db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL Timestamp zu Unix Timestamp</title>
		<link>http://hihn.org/2009/02/postgresql-timestamp-zu-unix-timestamp/</link>
		<comments>http://hihn.org/2009/02/postgresql-timestamp-zu-unix-timestamp/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 10:56:17 +0000</pubDate>
		<dc:creator>rh</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">https://hihn.org/?p=353</guid>
		<description><![CDATA[So kann man aus einem PostgreSQL Timestamp einen Unix Timestamp machen: select extract(epoch from "timestamp"(postgres_timestamp)) as unix_timestamp from table]]></description>
			<content:encoded><![CDATA[<p>So kann man aus einem PostgreSQL Timestamp einen Unix Timestamp machen:</p>
<pre>
select  extract(epoch from "timestamp"(<strong>postgres_timestamp</strong>)) as <strong>unix_timestamp</strong> from table
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hihn.org/2009/02/postgresql-timestamp-zu-unix-timestamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tabellen unter PostgreSQL anzeigen lassen</title>
		<link>http://hihn.org/2008/12/tabellen-unter-postgresql-anzeigen-lassen/</link>
		<comments>http://hihn.org/2008/12/tabellen-unter-postgresql-anzeigen-lassen/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 14:56:49 +0000</pubDate>
		<dc:creator>rh</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://hihn.org/?p=278</guid>
		<description><![CDATA[So kann man sich die Tabellen einer Datenbank unter PostgreSQL anzeigen lassen: SELECT table_name FROM information_schema.tables \ WHERE table_schema = 'public';]]></description>
			<content:encoded><![CDATA[<p>So kann man sich die Tabellen einer Datenbank unter PostgreSQL anzeigen lassen:</p>
<pre>
SELECT table_name FROM information_schema.tables \
WHERE table_schema = 'public';
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hihn.org/2008/12/tabellen-unter-postgresql-anzeigen-lassen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spalten einer Tabelle in MySQL/PostgreSQL abfragen</title>
		<link>http://hihn.org/2008/07/spalten-einer-tabelle-in-mysqlpostgresql-abfragen/</link>
		<comments>http://hihn.org/2008/07/spalten-einer-tabelle-in-mysqlpostgresql-abfragen/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 16:56:37 +0000</pubDate>
		<dc:creator>rh</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://hihn.org/?p=133</guid>
		<description><![CDATA[Mit MySQL kann man sich die Spalten einer Tabelle mit folgendem Befehl ausgeben lassen: SHOW COLUMNS FROM foo; Unter PostgreSQL geht es mit folgender Abfrage: SELECT column_name FROM information_schema.COLUMNS \ WHERE table_name = 'foo';]]></description>
			<content:encoded><![CDATA[<p>Mit MySQL kann man sich die Spalten einer Tabelle mit folgendem Befehl ausgeben lassen:</p>
<pre>
SHOW COLUMNS FROM foo;
</pre>
<p>Unter PostgreSQL geht es mit folgender Abfrage:</p>
<pre>
SELECT column_name FROM information_schema.COLUMNS \
 WHERE table_name = 'foo';
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hihn.org/2008/07/spalten-einer-tabelle-in-mysqlpostgresql-abfragen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Concat unter MySQL &amp; PostgreSQL</title>
		<link>http://hihn.org/2008/06/concat-unter-mysql-postgresql/</link>
		<comments>http://hihn.org/2008/06/concat-unter-mysql-postgresql/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 19:15:15 +0000</pubDate>
		<dc:creator>rh</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://hihn.org/?p=55</guid>
		<description><![CDATA[So kann man unter MySQL 2 Spalten in einer darstellen: SELECT CONCAT(id," ", name) AS spalte FROM tabelle; So geht es unter PostgreSQL: SELECT id &#124;&#124; ' ' &#124;&#124; name AS spalte FROM tabelle;]]></description>
			<content:encoded><![CDATA[<p>So kann man unter MySQL 2 Spalten in einer darstellen:</p>
<pre>
SELECT CONCAT(id," ", name) AS spalte FROM tabelle;
</pre>
<p>So geht es unter PostgreSQL:</p>
<pre>
SELECT id || ' ' || name AS spalte FROM tabelle;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hihn.org/2008/06/concat-unter-mysql-postgresql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PostgreSQL Datenbanken importieren</title>
		<link>http://hihn.org/2008/05/postgresql-datenbanken-importieren/</link>
		<comments>http://hihn.org/2008/05/postgresql-datenbanken-importieren/#comments</comments>
		<pubDate>Wed, 07 May 2008 08:45:15 +0000</pubDate>
		<dc:creator>rh</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://hihn.org/?p=60</guid>
		<description><![CDATA[PostgreSQL Datenbanken lassen sich ähnlich wie MySQL-Datenbanken importieren: $ psql -h host -p port -d database -U user < dump.sql Unter Windows kann man es so machen: C:\Programme\PostgreSQL\8.3\bin>psql.exe -h localhost -p 5432 \ -d database -U postgres < \ "C:\Dokumente und Einstellungen\foo\Desktop\dump.sql"]]></description>
			<content:encoded><![CDATA[<p>PostgreSQL Datenbanken lassen sich ähnlich wie MySQL-Datenbanken importieren:</p>
<pre>
$ psql -h host -p port -d database -U user < dump.sql
</pre>
<p>Unter Windows kann man es so machen:</p>
<pre>
C:\Programme\PostgreSQL\8.3\bin>psql.exe -h localhost -p 5432 \
-d database -U postgres < \
"C:\Dokumente und Einstellungen\foo\Desktop\dump.sql"
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hihn.org/2008/05/postgresql-datenbanken-importieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Join leicht gemacht</title>
		<link>http://hihn.org/2007/12/inner-join-leicht-gemacht/</link>
		<comments>http://hihn.org/2007/12/inner-join-leicht-gemacht/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 21:14:43 +0000</pubDate>
		<dc:creator>rh</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://www.hihn.org/?p=22</guid>
		<description><![CDATA[Eigentlich war ich ja ein Fan von Subselects aber heute hat es damit einfach nicht hingehauen. Also musste ich mich an alte Werte zurückentsinnen und habe mein Problem schliesslich mit Inner Join gelöst. Um was ging es? Ich habe eine Tabelle mit Usern (rd_accounts), eine Tabelle mit Gallerien (rd_gallerien) und eine Tabelle um die 2 [...]]]></description>
			<content:encoded><![CDATA[<p>Eigentlich war ich ja ein Fan von Subselects aber heute hat es damit einfach nicht hingehauen. Also musste ich mich an alte Werte zurückentsinnen und habe mein Problem schliesslich mit <strong>Inner Join</strong> gelöst.<br />
Um was ging es?<br />
Ich habe eine Tabelle mit  Usern (rd_accounts), eine Tabelle mit Gallerien (rd_gallerien) und eine Tabelle um die 2 zu verbinden (rd_gal_acc).<br />
Mit folgendem Inner Join verbindet man sie:</p>
<pre>
SELECT *
FROM rd_galerien
JOIN rd_gal_acc ON rd_gallerien.id_gal = rd_gal_acc.id_gal
</pre>
<p>Nun darf ein User natürlich nur seine Gallerien sehen:</p>
<pre>
SELECT *
FROM rd_galerien
JOIN rd_gal_acc ON rd_gallerien.id_gal = rd_gal_acc.id_gal
WHERE rd_gal_acc.id_user = '1'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hihn.org/2007/12/inner-join-leicht-gemacht/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
