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

Owner: Nobody in particular
Requestors: KES [...]

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
Download (untitled) / with headers
text/plain 104b
From: wolfsage [...]
Download (untitled) / with headers
text/plain 557b
On Thu Jan 19 09:35:35 2017, KES wrote: Show quoted text
> > 0.11021/lib/SQL/Translator/Producer/
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.
Download (untitled) / with headers
text/plain 195b
I have introduce next changes to workaround the problem. 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 infrastructure.

Please report any issues with to