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


Return-Path: <martin [...] the.earth.li>
X-Original-To: bug-Alzabo [...] rt.cpan.org
Delivered-To: cpan-bug+alzabo [...] pallas.eruditorum.org
Received: from the.earth.li (the.earth.li [193.201.200.66]) by pallas.eruditorum.org (Postfix) with ESMTP id DF62E84C03E for <bug-Alzabo [...] rt.cpan.org>; Sun, 19 Sep 2004 18:22:28 -0400 (EDT)
Received: from martin by the.earth.li with local (Exim 3.35 #1 (Debian)) id 1C99qg-0003dZ-00 for <bug-Alzabo [...] rt.cpan.org>; Sun, 19 Sep 2004 23:07:58 +0100
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
Message-Id: <20040919220758.GO25198 [...] earth.li>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="xgyAXRrhYN0wYx8y"
Content-Disposition: inline
User-Agent: Mutt/1.3.28i
Content-Length: 0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-RT-Original-Encoding: us-ascii
Content-Length: 468
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
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="Alzabo-0.83-Pg-sequence.diff"
X-RT-Original-Encoding: us-ascii
Content-Length: 503

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

Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.415 (Entity 5.415)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 627
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?
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.415 (Entity 5.415)
From: martin-rt-cpan [...] earth.li
X-RT-Original-Encoding: iso-8859-1
Content-Length: 267
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.