Skip Menu |

This queue is for tickets about the Alzabo CPAN distribution.

Maintainer(s)' notes

Not really maintained any more. Interested in taking it over? Email the author.

Report information
The Basics
Id: 7702
Status: new
Priority: 0/
Queue: Alzabo

People
Owner: DROLSKY [...] cpan.org
Requestors: martin-rt-cpan [...] earth.li
Cc:
AdminCc:

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



Date: Sun, 19 Sep 2004 23:07:58 +0100
From: Martin Ling <martin-rt-cpan [...] earth.li>
To: bug-Alzabo [...] rt.cpan.org
Subject: Column defaults not set for sequenced PostgreSQL columns
Alzabo 0.83 does not correctly set up sequenced columns with PostgreSQL. The sequence is created but the column default is not set appropriately. The attached patch rectifies the problem. Before: CREATE TABLE "Test" ( "foo" INTEGER NOT NULL, PRIMARY KEY ("foo") ) ; CREATE SEQUENCE "Test___foo"; ; After: CREATE TABLE "Test" ( "foo" INTEGER DEFAULT NEXTVAL('"Test___foo"') NOT NULL, PRIMARY KEY ("foo") ) ; CREATE SEQUENCE "Test___foo"; ; Martin

Message body is not shown because sender requested not to inline it.

[martin-rt-cpan@earth.li - Sun Sep 19 18:22:34 2004]: Show quoted text
> Alzabo 0.83 does not correctly set up sequenced columns with PostgreSQL. > The sequence is created but the column default is not set appropriately. > > The attached patch rectifies the problem. > > Before: > > CREATE TABLE "Test" ( > "foo" INTEGER NOT NULL, > PRIMARY KEY ("foo") > ) > ; > > CREATE SEQUENCE "Test___foo"; > ; > > After: > > CREATE TABLE "Test" ( > "foo" INTEGER DEFAULT NEXTVAL('"Test___foo"') NOT NULL, > PRIMARY KEY ("foo") > ) > ; > > CREATE SEQUENCE "Test___foo"; > ;
Is there any reason not to use a SERIAL column instead here?
From: martin-rt-cpan [...] earth.li
[DROLSKY - Mon Jan 3 01:15:42 2005]: Show quoted text
> Is there any reason not to use a SERIAL column instead here?
Acheives the same thing, but then PostgreSQL generates the sequence name in a different format and you can't automatically remove it if you later delete the column.