Skip Menu |

This queue is for tickets about the Rose-DB-Object CPAN distribution.

Report information
The Basics
Id: 46214
Status: resolved
Priority: 0/
Queue: Rose-DB-Object

People
Owner: Nobody in particular
Requestors: foudil.newbie [...] bigfoot.com
Cc:
AdminCc:

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



Subject: loader->make_modules with Postgresql ENUM column
Date: Tue, 19 May 2009 16:41:45 +0200
To: bug-Rose-DB-Object [...] rt.cpan.org
From: foudil.newbie [...] bigfoot.com
Dear John, I'm using $loader->make_modules to build from a PostgreSQL database. In one of my tables, I'd like to use an ENUM column, but it gets recognized as { type => 'scalar', length => 4 }. Which is incorrect. CREATE TYPE deposit_type AS ENUM ('publisher', 'author'); ALTER TABLE articles ADD COLUMN deposit_type DEPOSIT_TYPE; using : Rose-DB-0.750 Rose-DB-Object-0.780 DBD::Pg.pm 2.11.6 PostgreSQL 8.3 kind regards Foudil
This is fixed in SVN (revision 1928). The change will go out with the next release of Rose::DB and Rose::DB::Object
Thank you for the super-quick fix ! Works perfectly. I'd suggest a similar enhancement for postgres "domains" : CREATE DOMAIN deposit_type AS SMALLINT CHECK ( VALUE BETWEEN -1 AND 5 ); ALTER TABLE articles ADD COLUMN deposit_type DEPOSIT_TYPE; which gets recognized as { type => 'scalar', length => 2 }. kind regards Foudil
On Wed May 20 05:31:45 2009, foudfou wrote: Show quoted text
> Thank you for the super-quick fix ! Works perfectly. > > I'd suggest a similar enhancement for postgres "domains" : > > CREATE DOMAIN deposit_type AS SMALLINT > CHECK ( VALUE BETWEEN -1 AND 5 ); > > ALTER TABLE articles ADD COLUMN deposit_type DEPOSIT_TYPE; > > which gets recognized as { type => 'scalar', length => 2 }.
Unfortunately, these domain constraints are not available to me programmatically in a format that is amenable to automated parsing. But I'd welcome any patch that proves otherwise :) In the meantime, I'm closing this bug as the original issue is now fixed.