Skip Menu |
 

This queue is for tickets about the SQL-Translator CPAN distribution.

Report information
The Basics
Id: 119911
Status: open
Priority: 0/
Queue: SQL-Translator

People
Owner: Nobody in particular
Requestors: KES [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: S::T::Producer::PostgreSQL produce UNIQUE CONSTRAINT instead of UNIQUE INDEX
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-12845-1484836535-1059.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 104
Download (untitled) / with headers
text/plain 104b
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-12845-1484836535-1059.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: API
References: <rt-4.0.18-12845-1484836535-1059.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-13063-1487948338-1522.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.18-13063-1487948338-112.119911-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
From: wolfsage [...] gmail.com
Content-Length: 557
Download (untitled) / with headers
text/plain 557b
On Thu Jan 19 09:35:35 2017, KES wrote: Show quoted text
> https://metacpan.org/source/ILMARI/SQL-Translator- > 0.11021/lib/SQL/Translator/Producer/PostgreSQL.pm#L551
I think the complaint here is that if you say: $sqlt_table->add_index( name => 'new_index', fields => [ 'lower(some_column)' ], type => 'unique', ); the producer tries to create it as a CONSTRAINT in the table definition (which is invalid) rather than a 'CREATE INDEX' statement which would allow things like 'lower(some_column)'. This makes add_index not-very-useful for a lot of cases.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-13063-1487948338-1522.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-12845-1484836535-1059.0-0-0 [...] rt.cpan.org> <rt-4.0.18-13063-1487948338-1522.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-2984-1487954836-676.119911-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 195
Download (untitled) / with headers
text/plain 195b
I have introduce next changes to workaround the problem. https://github.com/dbsrgits/sql-translator/issues/82#issuecomment-276290608 I do not know how to fix that correctly. Hope it will help.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.