<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 26 03:23:34 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DC-919/DC-919.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DC-919] Import/Pgsql.php: listTableColumns - SQL failure with PostgreSQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-919</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;this issue was reported at the symfony project which uses Doctrine 1.2.3: &lt;br/&gt;
&lt;a href=&quot;http://trac.symfony-project.org/ticket/9152&quot; class=&quot;external-link&quot;&gt;http://trac.symfony-project.org/ticket/9152&lt;/a&gt;&lt;br/&gt;
&quot;php symfony doctrine:build-schema failure with PostgreSQL for 1.4.7 and 1.4.8 version&quot;&lt;/p&gt;

&lt;p&gt;The SQL Statement &apos;listTableColumns&apos; fails with an SQL-Error &quot;missing from-clause&quot;&lt;br/&gt;
&lt;a href=&quot;http://trac.doctrine-project.org/browser/tags/1.2.3/lib/Doctrine/Import/Pgsql.php#L96&quot; class=&quot;external-link&quot;&gt;http://trac.doctrine-project.org/browser/tags/1.2.3/lib/Doctrine/Import/Pgsql.php#L96&lt;/a&gt;&lt;br/&gt;
I can reproduce the error directly in psql or pgadmin. The SQL Statement seems related to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-697&quot; title=&quot;Doctrine Support of custom enum types in Pgsql&quot;&gt;&lt;del&gt;DC-697&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even when i turn on the add_missing_from option on the postgres-server it fails with &quot;missing relation&quot;.&lt;/p&gt;

&lt;p&gt;Now it seems to me, you already fixed this bug in the current 1.2 branch, because the current SQL-Statement is different and it works for me in psql/pgadmin.&lt;br/&gt;
&lt;a href=&quot;http://trac.doctrine-project.org/browser/branches/1.2/lib/Doctrine/Import/Pgsql.php#L96&quot; class=&quot;external-link&quot;&gt;http://trac.doctrine-project.org/browser/branches/1.2/lib/Doctrine/Import/Pgsql.php#L96&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Could you please close this ticket, if you already fixed this issue, or confirm if it&apos;s still an issue?&lt;br/&gt;
Attached you find my proposed patch at the symfony project . the current statement in the branch looks too different from my version, so i am not sure to use this patch directly. Tell me if I should work out a proper patch.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;error&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SQLSTATE[42P01]: Undefined table: 7 ERROR:  missing FROM-clause entry &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; table &lt;span class=&quot;code-quote&quot;&gt;&quot;t&quot;&lt;/span&gt;                                               
 	  LINE 6: ...                                                  t.typtype ...                                                       
 	                                                               ^. Failing Query: &quot;SELECT                                           
 	                                                       ordinal_position as attnum,                                                 
 	                                                       column_name as field,                                                       
 	                                                       udt_name as type,                                                           
 	                                                       data_type as complete_type,                                                 
 	                                                       t.typtype AS typtype,                                                       
 	                                                       is_nullable as isnotnull,                                                   
 	                                                       column_default as &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;,                                                   
 	                                                       (                                                                           
 	                                                         SELECT &apos;t&apos;                                                                 
 	                                                           FROM pg_index, pg_attribute a, pg_class c, pg_type t                     
 	                                                           WHERE c.relname = table_name AND a.attname = column_name                 
 	                                                           AND a.attnum &amp;gt; 0 AND a.attrelid = c.oid AND a.atttypid = t.oid           
 	                                                           AND c.oid = pg_index.indrelid AND a.attnum = ANY (pg_index.indkey)       
 	                                                           AND pg_index.indisprimary = &apos;t&apos;                                         
 	                                                           AND format_type(a.atttypid, a.atttypmod) NOT LIKE &apos;information_schema%&apos; 
 	                                                       ) as pri,                                                                   
 	                                                       character_maximum_length as length                                           
 	                                                     FROM information_schema.COLUMNS                                               
 	                                                     WHERE table_name = &apos;matable&apos;                                   
 	                                                     ORDER BY ordinal_position&quot;  
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Postgres Import Schema&lt;br/&gt;
</environment>
            <key id="12075">DC-919</key>
            <summary>Import/Pgsql.php: listTableColumns - SQL failure with PostgreSQL</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="christian_vogel">Christian Vogel</reporter>
                        <labels>
                    </labels>
                <created>Sun, 7 Nov 2010 04:49:56 +0000</created>
                <updated>Mon, 9 Apr 2012 14:17:24 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Import/Export</component>
                        <due></due>
                    <votes>4</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="14691" author="nahuelon" created="Tue, 9 Nov 2010 10:43:50 +0000"  >&lt;p&gt;We apply the diff patch you submit and works perfect. We are using Doctrine 1.2.3 with PostgreSQL 8.4.&lt;br/&gt;
We could generates models from database with generateModelsFromDb() method.&lt;br/&gt;
Please add this patch to a new release.&lt;br/&gt;
Thank you very much.&lt;/p&gt;</comment>
                    <comment id="14803" author="tim.hemming@spgroup.co.uk" created="Tue, 23 Nov 2010 07:15:21 +0000"  >&lt;p&gt;We have applied this patch directly to our server-wide Doctrine library and it works fine. We look forward to it becoming a part of the Doctrine distribution.&lt;/p&gt;</comment>
                    <comment id="14981" author="chotchki" created="Sun, 19 Dec 2010 01:56:38 +0000"  >&lt;p&gt;I can confirm that this bug also affects symfony 1.4.8 and the attached fix works perfectly!&lt;/p&gt;</comment>
                    <comment id="15361" author="dla" created="Mon, 21 Feb 2011 06:51:30 +0000"  >&lt;p&gt;Confirmed to fix crash with symfony 1.3.8&lt;/p&gt;</comment>
                    <comment id="17833" author="koyot" created="Mon, 9 Apr 2012 14:17:24 +0000"  >&lt;p&gt;I use the version 1.4.17 and also had the error with postgres 9.1. Applying the correction suggested in DIFF. The system worked.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10847" name="trac_9152_patch_for_Pgsql.php.diff" size="5112" author="christian_vogel" created="Sun, 7 Nov 2010 04:49:56 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>