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)

Attachments


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
Download (untitled) / with headers
text/plain 468b
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.

Download (untitled) / with headers
text/plain 627b
[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
Download (untitled) / with headers
text/plain 267b
[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.


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.