<?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>NewPush &#187; PostgreSQL</title> <atom:link href="http://newpush.com/tag/postgresql/feed/" rel="self" type="application/rss+xml" /><link>http://newpush.com</link> <description>Server Hosting, Data Warehouse Hosting, Collaboration</description> <lastBuildDate>Wed, 23 May 2012 03:47:03 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Creating Delete Triggers in PostgreSQL</title><link>http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/</link> <comments>http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/#comments</comments> <pubDate>Mon, 03 Aug 2009 22:31:57 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[PL/PGSQL]]></category> <category><![CDATA[PostgreSQL]]></category> <category><![CDATA[SQL]]></category> <category><![CDATA[Trigger]]></category><guid isPermaLink="false">http://www.wdream.com/2009/08/creating-delete-triggers-in-postgresql/</guid> <description><![CDATA[One of the common data integrity issues that can happen in a database is the unintended deletion of a row. Here is how to create a DELETE trigger in PostgreSQL. The example code below assumes you have a &#8220;customer_cus&#8221; table &#8230; <a href="http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>One of the common data integrity issues that can happen in a database is the unintended deletion of a row.  Here is how to create a DELETE trigger in PostgreSQL.</p><p>The example code below assumes you have a &#8220;customer_cus&#8221; table and a &#8220;customer_archive_cua&#8221; table with at least two fields.  It is a good idea to add a timestamp field to the archive table with DEFAULT now(), so that the date of deletion is captured.<br /> <code><br /> CREATE FUNCTION archive_customer() RETURNS TRIGGER AS '<br /> BEGIN<br /> INSERT INTO customer_archive_cua (name_cua, address_cua)<br /> VALUES (OLD.name_cus,OLD.address_cus);<br /> RETURN NULL;<br /> END;<br /> ' LANGUAGE 'plpgsql';<br /> CREATE TRIGGER customer_archive_on_delete AFTER DELETE ON customer_cus<br /> FOR EACH ROW EXECUTE PROCEDURE archive_customer();<br /> </code></p><h4>References</h4><ul><li><a href="http://www.amazon.com/gp/product/0672327562?ie=UTF8&#038;tag=wdr-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0672327562">PostgreSQL (2nd Edition) (Developer&#8217;s Library)</a><img src="http://www.assoc-amazon.com/e/ir?t=wdr-20&#038;l=as2&#038;o=1&#038;a=0672327562" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li></ul><p><iframe src="http://rcm.amazon.com/e/cm?t=wdr-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0672327562&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Connection pooling with mod_perl</title><link>http://newpush.com/2009/05/connection-pooling-with-mod_perl/</link> <comments>http://newpush.com/2009/05/connection-pooling-with-mod_perl/#comments</comments> <pubDate>Sun, 31 May 2009 15:26:43 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[Perl]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[DBI]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[mod_perl]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=289</guid> <description><![CDATA[I found this info in the PostgreSQL archives. Here are  2 methods: Best method from Dan Lyke: Apache::DBI will pool across Perl programs, and you don&#8217;t have to change anything in your scripts. Next best method from Gilles DAROLD: in &#8230; <a href="http://newpush.com/2009/05/connection-pooling-with-mod_perl/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I found this info in the <a href="http://archives.postgresql.org/pgsql-general/2001-01/msg01362.php">PostgreSQL archives</a>.  Here are  2 methods:</p><p><strong>Best method</strong> from <em>Dan Lyke</em>: <code>Apache::DBI</code> will pool across Perl programs, and you don&#8217;t have to change anything in your scripts.</p><p><strong>Next best method</strong> from <em>Gilles DAROLD</em>: in your perl script use the following code</p><pre>use vars qw($dbh);

$dbh ||= DBI::connect($datasrc, $dbuser, $dbpwd);</pre><p>These can be use to create a database connection class in Perl that can handle transparently the connection / reconnection and disconnection for your code.  The end use code doesn&#8217;t have to be OO, thus the connection object can be reused in any legacy code.</p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/connection-pooling-with-mod_perl/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to change ownership of a PostgreSQL database</title><link>http://newpush.com/2009/05/how-to-change-ownership-of-a-postgresql-database/</link> <comments>http://newpush.com/2009/05/how-to-change-ownership-of-a-postgresql-database/#comments</comments> <pubDate>Sun, 31 May 2009 15:01:47 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Data Warehouse]]></category> <category><![CDATA[Dedicated Servers]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Managed Hosting]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=275</guid> <description><![CDATA[To change the owner of a database we have found this solution: UPDATE pg_database SET datdba=(SELECT usesysid FROM pg_shadow WHERE usename='new_owner') WHERE datname='db_name'; http://archives.postgresql.org/pgsql-admin/2003-07/msg00301.php * From: Tom Lane * To: Devrim GUNDUZ * Subject: Re: changing ownership of db * &#8230; <a href="http://newpush.com/2009/05/how-to-change-ownership-of-a-postgresql-database/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><span class="grey">To change the owner of a database we have found this solution:</span></p><p><code>UPDATE pg_database SET datdba=(SELECT usesysid FROM pg_shadow WHERE  usename='new_owner') WHERE datname='db_name';</code></p><p><a href="http://archives.postgresql.org/pgsql-admin/2003-07/msg00301.php">http://archives.postgresql.org/pgsql-admin/2003-07/msg00301.php</a></p><pre>    * From: Tom Lane
    * To: Devrim GUNDUZ
    * Subject: Re: changing ownership of db
    * Date: Tue, 29 Jul 2003 17:41:08 -0400

Devrim GUNDUZ  writes:
&gt; On Tue, 29 Jul 2003, Benjamin Thelen (CCGIS) wrote:
&gt;&gt; I would like to change the ownership of a database.

&gt; UPDATE pg_database SET datdba=(SELECT usesysid FROM pg_shadow WHERE
&gt; usename='new_owner') WHERE datname='db_name';

That is all you need to do --- it's the only place CREATE DATABASE
records the owner's identity.

&gt; If you also want to change the owner of the tables, update pg_class:

&gt; UPDATE pg_class SET relowner=(SELECT usesysid FROM pg_shadow WHERE
&gt; usename='new_owner')  WHERE relname IN (SELECT relname from
&gt; pg_class WHERE relname NOT LIKE 'pg_%');

This is likely to be a very bad idea, especially if you give ownership
of the system tables to a non-superuser.  Ownership of those tables
stays with the postgres user during a CREATE DATABASE.

			regards, tom lane</pre>]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/how-to-change-ownership-of-a-postgresql-database/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>PostreSQL Upgrade Process</title><link>http://newpush.com/2009/05/postresql-upgrade-process/</link> <comments>http://newpush.com/2009/05/postresql-upgrade-process/#comments</comments> <pubDate>Sun, 31 May 2009 15:00:09 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Data Warehouse]]></category> <category><![CDATA[Dedicated Servers]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Managed Hosting]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=272</guid> <description><![CDATA[First you need to change permissions on the localhost to trust: # cd /var/lib/pgsql/data # vi pg_hba.conf Change the autorization/authentication for the line that starts with &#8220;local&#8221; to trust: local all trust And prevent clients to access the database by &#8230; <a href="http://newpush.com/2009/05/postresql-upgrade-process/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<ul><li>First you need to change permissions on the localhost to trust:<pre># cd /var/lib/pgsql/data

# vi pg_hba.conf</pre><p>Change the autorization/authentication for the line that starts with &#8220;local&#8221; to <em>trust</em>:</p><pre>local        all                                           trust</pre></li><li> And prevent clients to access the database by changing in postgresql.conf:<pre>tcpip_socket = true</pre><p>to</p><pre>tcpip_socket = false</pre><p>and</p><pre>ssl = true</pre><p>to</p><pre>ssl = false</pre></li><li>restart postgres:<pre># service postgresql restart</pre><p>If you are having trouble restarting postgres, try to force the restart:</p><pre># su - postgres

$ pg_ctl -m immediate -D /var/lib/pgsql/data restart</pre></li><li>Create a backup of the database:<pre># sudo -u postgres pg_dumpall &gt; ~postgres/backups/full-[version]-[date].out</pre></li><li>Shut down PostgreSQL<pre># service postgresql stop</pre></li><li>Upgrade PostgreSQL<pre># rpm -Uvh /usr/src/redhat/RPMS/i686/postgresql-*rpm</pre></li><li>Move the old db structure out of the way:<pre># mv /var/lib/pgsql/data /var/lib/pgsql/backups/data-[oldversion]</pre></li><li>Start postgres back up:<pre># service postgresql start</pre></li><li>Modify the pg_hba.conf file back to what we need it to be for the migration (see previously)</li><li>Restore the database:<pre>sudo -u postgres psql -e template1 -f ~postgres/backups/full-[version]-[date].out &gt; create.log 2&gt; error.log</pre></li><li>Restore the /etc/init.d/postgresql file with the logging:<pre>su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -l /var/log/pgsql -D $PGDATA -p /usr/bin/postmaster -o '-p ${PGPORT}' start  &gt; /dev/null 2&gt;&amp;1" &lt; /dev/null</pre><p>Make sure to check the error.log, and if you encounter &#8220;permission denied&#8221; problems, make sure the the user (at top of the backup file) has the correct permissions set.</li><li>Restore pg_hba.conf and the postgresql.conf files to the original values</li><li>Restore the server certs<pre>cp -a /var/lib/pgsql/backups/data-[version]/server.* /var/lib/pgsql/data

chown postgres.root /var/lib/pgsql/data/server.*

chmod 600 /var/lib/pgsql/data/server.*</pre></li><li>Restore the postgres password to the correct pass:<pre>ALTER USER "postgres" WITH PASSWORD 'secret-password-here' CREATEDB CREATEUSER</pre></li><li>Restart PostgreSQL</li></ul> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/postresql-upgrade-process/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Rebuild Postgres for specific platform</title><link>http://newpush.com/2009/05/rebuild-postgres-for-specific-platform/</link> <comments>http://newpush.com/2009/05/rebuild-postgres-for-specific-platform/#comments</comments> <pubDate>Sun, 31 May 2009 14:58:26 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[AIX]]></category> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Data Warehouse]]></category> <category><![CDATA[Dedicated Servers]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Mac OS X]]></category> <category><![CDATA[Managed Hosting]]></category> <category><![CDATA[OpenBSD]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=270</guid> <description><![CDATA[# rpm -i postgres-[version number].src.rpm # rpmbuild -bb --target i686 /usr/src/redhat/SPECS/postgresql.spec If you get a problem with unpackaged files, use the following trick: vi /usr/lib/rpm/macros An modify some of the lines as follows: # # Script gets packaged file list &#8230; <a href="http://newpush.com/2009/05/rebuild-postgres-for-specific-platform/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><span class="grey"></p><pre># rpm -i postgres-[version number].src.rpm

# rpmbuild -bb --target i686 /usr/src/redhat/SPECS/postgresql.spec</pre><p>If you get a problem with unpackaged files, use the following trick:</p><pre>
vi /usr/lib/rpm/macros</pre><p>An modify some of the lines as follows:</p><pre>
#

# Script gets packaged file list on input and buildroot as first parameter.

# Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged.

#

# Note: Disable (by commenting out) for legacy compatibility.

#%__check_files         /usr/lib/rpm/check-files %{buildroot}

#

# Should unpackaged files in a build root terminate a build?

#

# Note: The default value should be 0 for legacy compatibility.

%_unpackaged_files_terminate_build      0

#

# Should missing %doc files in the build directory terminate a build?

#

# Note: The default value should be 0 for legacy compatibility.

%_missing_doc_files_terminate_build     0</pre><p></span></p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/rebuild-postgres-for-specific-platform/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Creating a PostgreSQL datasource with ColdFusion MX</title><link>http://newpush.com/2009/05/creating-a-postgresql-datasource-with-coldfusion-mx/</link> <comments>http://newpush.com/2009/05/creating-a-postgresql-datasource-with-coldfusion-mx/#comments</comments> <pubDate>Mon, 04 May 2009 02:13:15 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[Java]]></category> <category><![CDATA[CFMX]]></category> <category><![CDATA[Cold Fusion]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=168</guid> <description><![CDATA[To set up a PostgreSQL datasource for ColdFusion (CFMX), follow these steps: Open CFMX administrator Click on &#8220;Data Sources&#8221; In the &#8220;add new datasource&#8221; write in a name and select &#8220;other&#8221; before clicking &#8220;add&#8221; Fill our the fields as follows: &#8230; <a href="http://newpush.com/2009/05/creating-a-postgresql-datasource-with-coldfusion-mx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>To set up a PostgreSQL datasource for ColdFusion (CFMX), follow these steps:</p><ul><li>Open CFMX administrator</li><li>Click on &#8220;Data Sources&#8221;</li><li>In the &#8220;add new datasource&#8221; write in a name and select &#8220;other&#8221; before clicking &#8220;add&#8221;</li><li>Fill our the fields as follows:<pre>
CF Data Source Name: JDBC
URL: jdbc:postgresql://DB_server_fqdn:5432/ (as per Pedro's comment)
Driver Class: org.postgresql.Driver
Driver Name: PostgreSQL
Username: db_user_name
Password: ******
Description:
</pre></li><li>Click submit</li><li>Test connection (Status shoudl say &#8220;OK&#8221;)</li></ul> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/creating-a-postgresql-datasource-with-coldfusion-mx/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How to delete records with duplicate fields, such as dupplicate emails?</title><link>http://newpush.com/2009/05/how-to-delete-records-with-duplicate-fields-such-as-dupplicate-emails/</link> <comments>http://newpush.com/2009/05/how-to-delete-records-with-duplicate-fields-such-as-dupplicate-emails/#comments</comments> <pubDate>Mon, 04 May 2009 02:09:32 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Oracle]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=166</guid> <description><![CDATA[To delete records where only a field is duplicated, we can use a similar technique to the general duplicate removal technique: CREATE TABLE temp AS SELECT DISTINCT ON (email) * FROM table_to_deduplicate; DROP TABLE table_to_deduplicate; ALTER TABLE temp RENAME TO &#8230; <a href="http://newpush.com/2009/05/how-to-delete-records-with-duplicate-fields-such-as-dupplicate-emails/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>To delete records where only a field is duplicated, we can use a similar technique to the general duplicate removal technique:</p><pre>
CREATE TABLE temp AS SELECT DISTINCT ON (email) * FROM table_to_deduplicate;
DROP TABLE table_to_deduplicate;
ALTER TABLE temp RENAME TO table_to_deduplicate;
</pre><p>Be mindful of the fact that this process will not preserve the constraints on the original table. So if you have indexes, NOT NULL attributes, primary keys, foreign keys, you&#8217;ll have to recreate them.</p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/how-to-delete-records-with-duplicate-fields-such-as-dupplicate-emails/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to delete dupplicate records in DB2, Oracle, MySQL, and PostgreSQL</title><link>http://newpush.com/2009/05/how-to-delete-dupplicate-records-in-db2-oracle-mysql-and-postgresql/</link> <comments>http://newpush.com/2009/05/how-to-delete-dupplicate-records-in-db2-oracle-mysql-and-postgresql/#comments</comments> <pubDate>Mon, 04 May 2009 02:06:59 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Oracle]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=164</guid> <description><![CDATA[To delete dupplicate records in SQL, the following sequence of commands will do the trick: CREATE TABLE temp AS SELECT DISTINCT * FROM table_to_deduplicate; DROP TABLE table_to_deduplicate; ALTER TABLE temp RENAME TO table_to_deduplicate; Be mindful of the fact that this &#8230; <a href="http://newpush.com/2009/05/how-to-delete-dupplicate-records-in-db2-oracle-mysql-and-postgresql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>To delete dupplicate records in SQL, the following sequence of commands will do the trick:</p><pre>
CREATE TABLE temp AS SELECT DISTINCT * FROM table_to_deduplicate;
DROP TABLE table_to_deduplicate;
ALTER TABLE temp RENAME TO table_to_deduplicate;
</pre><p>Be mindful of the fact that this process will not preserve the constraints on the original table. So if you have indexes, NOT NULL attributes, primary keys, foreign keys, you&#8217;ll have to recreate them.</p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/how-to-delete-dupplicate-records-in-db2-oracle-mysql-and-postgresql/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>PostgreSQL to DB2 export conversion</title><link>http://newpush.com/2009/03/postgresql-to-db2-export-conversion/</link> <comments>http://newpush.com/2009/03/postgresql-to-db2-export-conversion/#comments</comments> <pubDate>Thu, 26 Mar 2009 17:59:53 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=124</guid> <description><![CDATA[PostgreSQL and DB2 use different styles of conventions to represent NULL. In PostgreSQL, the convention is to have &#8220;N&#8221; in the data to be loaded with the COPY command. In DB2, the LOAD command can be set to consider and &#8230; <a href="http://newpush.com/2009/03/postgresql-to-db2-export-conversion/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>PostgreSQL and <b>DB2</b> use different styles of conventions to represent NULL.  In PostgreSQL, the convention is to have &#8220;N&#8221; in the data to be loaded with the COPY command.  In DB2, the LOAD command can be set to consider and empty field as NULL.  Thus, to convert from DB2 to POstgreSQL style data dump, assuming TAB as the delimiter, we would use:</p><pre>sed -e 's/tt/t\Nt/g' -e 's/t$/t\N/g' -e 's/tt/t\Nt/g' db2_file &gt; pg_file</pre><p>Conversely, to convert from PostgreSQL to DB2 style, with TAB delimited data:</p><pre>sed -e 's/t\Nt/tt/g' -e 's/t\N$/t/g' -e 's/t\Nt/tt/g' db2_file &gt; pg_file</pre><p>The reason we need to go with 3 steps is the following:</p><ul><li>step 1: convert TAB NULL TAB</li><li>step2: convert TAB NULL at the end of line</li><li>step3: convert TAB NULL TAB from sequences where originally there was TAB NULL TAB NULL</li></ul><p>All this has been tested on AIX and Linux.</p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/03/postgresql-to-db2-export-conversion/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Can&#8217;t edit PostgreSQL datasource in CFMX</title><link>http://newpush.com/2006/11/cant-edit-postgresql-datasource-in-cfmx/</link> <comments>http://newpush.com/2006/11/cant-edit-postgresql-datasource-in-cfmx/#comments</comments> <pubDate>Sun, 12 Nov 2006 09:15:36 +0000</pubDate> <dc:creator>Domonkos</dc:creator> <category><![CDATA[Cloud Computing]]></category> <category><![CDATA[Data Warehouse]]></category> <category><![CDATA[Dedicated Servers]]></category> <category><![CDATA[Hosting Support]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Managed Hosting]]></category> <category><![CDATA[CFMX]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://newpush.com/?p=1556</guid> <description><![CDATA[The original URL where we found this solution is here: PostgreSQL DSN Config Bug Workaround for PostgreSQL DSN Config Bug How to fix a bug for PostgreSQL Data Source configuration in the ColdFusion MX Administrator. The author discovered the solution &#8230; <a href="http://newpush.com/2006/11/cant-edit-postgresql-datasource-in-cfmx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>The original URL where we found this solution is here: <a href="http://www.talkingtree.com/blog/index.cfm?mode=day&amp;day=5&amp;month=03&amp;year=2004">PostgreSQL DSN Config Bug</a></p><h3>Workaround for PostgreSQL DSN Config Bug</h3><h4>How to fix a bug for PostgreSQL Data Source configuration in the ColdFusion MX Administrator.</h4><p>The author discovered the solution on this <a href="http://www.houseoffusion.com/cf_lists/index.cfm?method=messages&amp;ThreadID=27942&amp;forumid=4&amp;">CFTALK thread</a>. The problem is that when configuring a PostgreSQL DSN according to the instructions in this <a href="http://www.macromedia.com/support/coldfusion/ts/documents/tn18338.htm">TechNote</a>, if you choose a Driver Name field of PostgreSQL, then that will trigger ColdFusion to invoke a handler template of <code>postgresql.cfm</code>. This handler template is defined in the configuration file <code>neo-query.xml</code> in ColdFusion MX&#8217;s lib directory. At one time the ColdFusion MX Administrator was going to provide a PostgreSQL JDBC driver out of the box, and that was partially implemented. However, the <code>postgresql.cfm</code> handler file was never implemented or even created. The result is that after first creating the datasource, when you return to edit it again ColdFusion will recognize the Driver Name of PostgreSQL and attempt to trigger the <code>postgresql.cfm</code>handler. This causes the error:</p><pre>"File not found: /CFIDE/administrator/datasources/postgresql.cfm
The specific sequence of files included or processed is:
C:\CFusionMX\wwwroot\CFIDE\administrator\datasources\postgresql.cfm "</pre><p>The solution in the CFTALK thread shows how to change the handler reference from postgresql.cfm to default.cfm. Then restart ColdFusion MX. You will then be able to edit the datasource correctly. <a href="http://www.talkingtree.com/RoboDemo/postgresql_bug.cfm">Click Here for the interactive RoboHelp (Demo).</a><br /> <strong>Pete Freitag pointed out in a comment that a better solution would be to find the default.cfm then make a copy named postgresql.cfm.</strong></p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2006/11/cant-edit-postgresql-datasource-in-cfmx/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: newpush.com @ 2012-05-23 05:17:19 by W3 Total Cache -->
