<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 16:12:49 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/DBAL-264/DBAL-264.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>[DBAL-264] Support for UIDs in PostgreSQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-264</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Please add support for uuid datatype in PostgreSQL&lt;/p&gt;</description>
                <environment></environment>
            <key id="13671">DBAL-264</key>
            <summary>Support for UIDs in PostgreSQL</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rivaros">ross neacoders</reporter>
                        <labels>
                    </labels>
                <created>Mon, 30 Apr 2012 16:09:09 +0000</created>
                <updated>Mon, 29 Apr 2013 02:05:11 +0000</updated>
                                    <version>2.3</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18828" author="zeroem" created="Fri, 12 Oct 2012 06:00:59 +0000"  >&lt;p&gt;It seems the only missing piece is the implementation of the getGuidExpression method in the PostgreSqlPlatform class.&lt;/p&gt;

&lt;p&gt;Details on generating UUIDs from postgres can be found here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.postgresql.org/docs/current/static/uuid-ossp.html&quot; class=&quot;external-link&quot;&gt;http://www.postgresql.org/docs/current/static/uuid-ossp.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Things that would need to be addressed:&lt;/p&gt;

&lt;p&gt;1) It requires the uuid-ossp module to be installed in the database.  Solve with documentation or ...?&lt;/p&gt;

&lt;p&gt;2) There isn&apos;t just one function.  Just pick one or make it configurable with a sane default?&lt;/p&gt;</comment>
                    <comment id="19113" author="scribblet" created="Mon, 10 Dec 2012 05:20:26 +0000"  >&lt;p&gt;I have implemented this for my own project, using what I think is a sane default:&lt;/p&gt;

&lt;p&gt;    public function getGuidExpression()&lt;/p&gt;
    {
        return &apos;uuid_generate_v4()&apos;;
    }

&lt;p&gt;The other issue I think that needs addressing is that the extension must be loaded into the current database upon creation. Either this is a deal-breaker right here (relying on a PGSQL plugin that&apos;s not available by default)&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;If not, maybe schema:update/create needs to check for whether postgresql is being used, whether there is a guid type/generator being used in an entity, and then either execute CREATE EXTENSION uuid-ossp;, and failing that return an exception that informs the user that uuid-ossp must be available as an extension before GUID generation can be used in entities.&lt;/p&gt;

&lt;p&gt;Can someone explain to me please the position on this currently? Is it not ok to rely on non-core/standard functionality?&lt;/p&gt;</comment>
                    <comment id="20101" author="mbadolato" created="Thu, 25 Apr 2013 00:23:23 +0000"  >&lt;p&gt;Is there any sort of decision on this item? I was trying to use UUID with Postgres and finally got it to work by adding&lt;/p&gt;

&lt;p&gt;public function getGuidExpression()&lt;/p&gt;
{
    return &apos;UUID_GENERATE_V4()&apos;;
}

&lt;p&gt;and went to submit a patch, then found this ticket and see that it&apos;s the exact same solution that Ross Cousens submitted above. I&apos;d really like to not maintain my own fork of the repository just to have this change in place, and it seems like a reasonable fix (barring the uuid-ossp extension not being a Postgres default extension). Can we get this in there so it&apos;s available, and worry about the issue of informing the user about the extension at a later point?  &lt;/p&gt;

&lt;p&gt;Or is there an easy way that anyone knows that I can add the function to my own class (in a Symfony2 project) that would extend PostgreSqlPlatform.php and add the function, without the need for me to fork Doctrine and add it on my own?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
--mark&lt;/p&gt;</comment>
                    <comment id="20106" author="mbadolato" created="Thu, 25 Apr 2013 18:24:26 +0000"  >&lt;p&gt;Pull request submitted&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/dbal/pull/312&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/312&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20107" author="scribblet" created="Fri, 26 Apr 2013 01:50:37 +0000"  >&lt;p&gt;I hope this gets accepted but I fear it won&apos;t.&lt;/p&gt;

&lt;p&gt;The original complaint against implementing GUID for the PostgreSQL platform driver was because a) it required a separate extension to be enabled on the server itself b) and there were a number of GUID generation functions available.&lt;/p&gt;

&lt;p&gt;To use anything but v4 would be asinine unless some external constraint was forcing you to use the older generation algorithms, so I think argument b is mostly moot. Argument a can easily be solved with documentation, programmatically as well (would require more work) or just left as is because the error back from postgresql is very verbose. Cannot find function uuid_generate_v4. Google it, see that extension is required, see that it&apos;s available in PostgreSQL contrib packages, enable it, and voila it works.&lt;/p&gt;</comment>
                    <comment id="20108" author="mbadolato" created="Fri, 26 Apr 2013 02:30:09 +0000"  >&lt;p&gt;Agreed, and I think that having SOMETHING that is usable (and has a very clear message that you need to install an extension) is better than nothing. The implementation can be expanded later to cover the extension not existing, or using something other than v4, etc.  But this should be good enough for most people and it seems silly not to have, or at least not have a way to override and provide it. &lt;/p&gt;

&lt;p&gt;I was looking at the Symfony configs to see if there was a way to define my own platform class that could then just extend the current PostgreSqlPlatform class and add a the function, but that doesn&apos;t seem to be doable (or I just missed it)&lt;/p&gt;</comment>
                    <comment id="20118" author="mbadolato" created="Sat, 27 Apr 2013 08:40:08 +0000"  >&lt;p&gt;I just saw that this got merged into master. As soon as this hits 2.3* I can do away with the manual UUID generation for id&apos;s that we&apos;re currently doing &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Thanks much Benjamin!&lt;/p&gt;</comment>
                    <comment id="20124" author="scribblet" created="Mon, 29 Apr 2013 02:04:36 +0000"  >&lt;p&gt;Yay, I am happy that this has been accepted and will make it through to next release. Thank you Mark/Benjamin!&lt;/p&gt;

</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>