You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Dave Johnson <da...@rollerweblogger.org> on 2005/10/12 21:51:25 UTC

DB2 and Derby support wrapup?

Is this complete? Can we close the JIRA issues for DB2 and Derby 
support and if not, what remains to be done?

And BTW, the 2.0 bug list is getting pretty slim.

- Dave


Re: DB2 and Derby support wrapup?

Posted by Elias Torres <el...@torrez.us>.
I think DB2 and Derby support are good enough to close. If we have any
more issues, we can always open a new bug report.

Elias

On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> Is this complete? Can we close the JIRA issues for DB2 and Derby
> support and if not, what remains to be done?
>
> And BTW, the 2.0 bug list is getting pretty slim.
>
> - Dave
>
>

Re: DB2 and Derby support wrapup?

Posted by Henri Yandell <fl...@gmail.com>.
On 10/16/05, Dave Johnson <da...@rollerweblogger.org> wrote:
>
> Here's my theory. We changed the weblog entry pubtime into a date field
> rather than a timestamp and I bet we didn't test against PostgreSQL (I
> know I didn't).
>
> According to the docs below, we need to do the temp table trick if we
> want to change a column type in PostgreSQL:
>
>     http://techdocs.postgresql.org/techdocs/updatingcolumns.php

This was against a fresh database. Assuming the above means the
migration scripts.

I'll test converting a 1.3 database to 2.0 in postgres.

> Then, we may have data type issues. I hope PostgreSQL has a compatible
> DATETIME field.

Will see what I can find out.

Hen

Re: DB2 and Derby support wrapup?

Posted by Henri Yandell <fl...@gmail.com>.
On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> On Sun, 2005-10-16 at 17:12, Elias Torres wrote:
> > I just noticed that change in the schema (date field in weblogentry)
> > too and it breaks DB2 since the field type is not supported. I checked
> > documentation and datetime is also not supported on Derby either.
> > Anyways, I don't know the differences between datetime and timestamp.
> > Why does pubtime need to be a datetime as opposed to a timestamp? Is
> > this something that can be done via a customizable datatype as in
> > TEXT? Just a thought.
>
> I put in the change from Timestamp to Datetime because in Mysql if you insert a NULL value into a Timestamp column then Mysql will automatically set it to the current date/time.  The modification I made to the way pubtime works requires that we be able to save draft entries with a NULL pubtime.
>
> In Mysql the Timestamp and Datetime are the exact same thing except that a Datetime will never be set automatically.

Definitely a good reason to change for MySql.

Given that a java.sql.Timestamp is the relevant class in either case,
how does changing this affect the other db's? Does Hibernate have
separate Timestamp and Datetime mappings?

Hen

Re: DB2 and Derby support wrapup?

Posted by Henri Yandell <fl...@gmail.com>.
On 10/19/05, Henri Yandell <fl...@gmail.com> wrote:
> I'm generally confused on this issue. Isn't this the kind of thing
> that should be different per database and JDBC can hide from us? Why
> not have DATETIME for Mysql, TIMESTAMP for Postgres, DATE for Oracle
> etc?
>
> In JDBC you'd just use java.sql.Timestamp, which would squeeze into
> each one. Hibernate I imagine you'd use a Timestamp type or something
> (I'm rusty at Hibernate nowadays :) ).
>
> I also think this is the reason why http://db.apache.org/ddlutils/ exists.
>
> Apologies for the dumb email, after a year of baby-juggling, I've
> finally found time to start digging into Roller and I've not delved
> into how the db side of things is working.

Digging into things.

Looks pretty simple (meaning it won't be, but I'm too ignorant to know
why). Why not just add a property to each of the db_...properties
files for the preferred java.sql.Timestamp type?

Assuming that other databases are as iffy with their TIMESTAMP support
as Oracle is; it seems a good one to be dynamic on.

Hen

Re: DB2 and Derby support wrapup?

Posted by Allen Gilliland <Al...@Sun.COM>.
I think that sounds like a great idea.

In truth I was never able to test the pubtime fix that I applied on other databases, so I suppose that any other database that uses a TIMESTAMP column that cannot be set to NULL would still not be working.

-- Allen


On Wed, 2005-10-19 at 17:05, Henri Yandell wrote:
> I'm generally confused on this issue. Isn't this the kind of thing
> that should be different per database and JDBC can hide from us? Why
> not have DATETIME for Mysql, TIMESTAMP for Postgres, DATE for Oracle
> etc?
> 
> In JDBC you'd just use java.sql.Timestamp, which would squeeze into
> each one. Hibernate I imagine you'd use a Timestamp type or something
> (I'm rusty at Hibernate nowadays :) ).
> 
> I also think this is the reason why http://db.apache.org/ddlutils/ exists.
> 
> Apologies for the dumb email, after a year of baby-juggling, I've
> finally found time to start digging into Roller and I've not delved
> into how the db side of things is working.
> 
> Hen


Re: DB2 and Derby support wrapup?

Posted by Henri Yandell <fl...@gmail.com>.
I'm generally confused on this issue. Isn't this the kind of thing
that should be different per database and JDBC can hide from us? Why
not have DATETIME for Mysql, TIMESTAMP for Postgres, DATE for Oracle
etc?

In JDBC you'd just use java.sql.Timestamp, which would squeeze into
each one. Hibernate I imagine you'd use a Timestamp type or something
(I'm rusty at Hibernate nowadays :) ).

I also think this is the reason why http://db.apache.org/ddlutils/ exists.

Apologies for the dumb email, after a year of baby-juggling, I've
finally found time to start digging into Roller and I've not delved
into how the db side of things is working.

Hen

Re: DB2 and Derby support wrapup?

Posted by Allen Gilliland <Al...@Sun.COM>.
okay, so it sounds like the way mysql uses timestamps is lame and need to work around it.

unfortunately we can't use '0000-00-00 00:00:00' because java doesn't support that date.  it's pretty funny really ...

this ...

System.out.println(Timestamp.valueOf("0000-00-00 00:00:00"));

yields this ...

0002-11-30 00:00:00.0

so we are now left with a situation where we can't set the pubtime to NULL because mysql doesn't allow that with Timestamps, and we can't set it to '0000-00-00 00:00:00' because java doesn't like that date.

i'm not sure how best to work around this issue.  we could simply alter the table using Elias' suggestion (pubtime TIMESTAMP NULL DEFAULT NULL) and tell our users it will only work on mysql 4.1.6 and above.  it won't cause any problems for users on older mysql dbs it is only a bit inconvenient.

ideas?

-- Allen


On Wed, 2005-10-19 at 13:28, Elias Torres wrote:
> On 10/19/05, Allen Gilliland <Al...@sun.com> wrote:
> > okay ... i've tested this and it works on mysql 4.1.x, but not on mysql 4.0.x.  i don't think we should drop support for mysql 4.0.x, especially because we use a 4.0.x db for one of our roller installs here at Sun.
> >
> > Elias,
> >
> > what exactly is broken about it?  does Derby/DB2/others not have a column type of DATETIME?  or does the conversion now work from TIMESTAMP to DATETIME?
> >
> > -- Allen
> 
> Derby/DB2 do no have a column type DATETIME, only TIMESTAMP. :-(
> 
> I've checked for Oracle/PostgreSQL and they don't have one either by a
> quick search. I love mySQL because of its installation ease and
> extremely easy php access to it on linux. But with the little db
> experience I have, I've come to find that it's the least non-standard
> database we are using in Roller. Therefore, if it was up to me, we
> should start with a more standards-compliant SQL and especialize it
> for the less non-standards ones. I did a quick check on the
> createdb-raw.sql and we don't have any other use for DATETIME except
> here.  Is there any other way to work around this problem? Can we turn
> the NULL into some 0000000 date?
> 
> Elias
> 
> >
> >
> > On Mon, 2005-10-17 at 13:57, Elias Torres wrote:
> > > On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> > > > On Mon, 2005-10-17 at 13:00, Elias Torres wrote:
> > > > > I have checked this with DB2 and it works fine:
> > > > >
> > > > > [[[
> > > > > CREATE TABLE t1 (  ts1 TIMESTAMP DEFAULT NULL );
> > > > > ]]]
> > > >
> > > > Does this work as expected with Mysql 4.0.x though?
> > > >
> > > > what about this paragraph from the link you gave ...
> > > >
> > > > "If a DEFAULT value is specified for the first TIMESTAMP column in a table, it is not ignored. The default can be CURRENT_TIMESTAMP or a constant date and time value.
> > > >
> > >
> > > We could make pubtime be the second column. :-)
> > >
> > > > DEFAULT NULL is the same as DEFAULT CURRENT_TIMESTAMP for the first TIMESTAMP column. For any other TIMESTAMP column, DEFAULT NULL is treated as DEFAULT 0."
> > > >
> > > > I suppose we need to test this a bit.
> > >
> > > Let's please do that, because I don't think that there should be many
> > > requirements that would make us drop support for any of the databases
> > > we currently support.
> > >
> > > >
> > > > -- Allen
> > > >
> > > >
> > > > > Regards,
> > > > >
> > > > > Elias
> > > > >
> > > > > [1] http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html
> > > > > [2] http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html
> > > > >
> > > > >
> > > > >
> > > > > On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> > > > > > On Sun, 2005-10-16 at 17:12, Elias Torres wrote:
> > > > > > > I just noticed that change in the schema (date field in weblogentry)
> > > > > > > too and it breaks DB2 since the field type is not supported. I checked
> > > > > > > documentation and datetime is also not supported on Derby either.
> > > > > > > Anyways, I don't know the differences between datetime and timestamp.
> > > > > > > Why does pubtime need to be a datetime as opposed to a timestamp? Is
> > > > > > > this something that can be done via a customizable datatype as in
> > > > > > > TEXT? Just a thought.
> > > > > >
> > > > > > I put in the change from Timestamp to Datetime because in Mysql if you insert a NULL value into a Timestamp column then Mysql will automatically set it to the current date/time.  The modification I made to the way pubtime works requires that we be able to save draft entries with a NULL pubtime.
> > > > > >
> > > > > > In Mysql the Timestamp and Datetime are the exact same thing except that a Datetime will never be set automatically.
> > > > > >
> > > > > > -- Allen
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > Elias
> > > > > > >
> > > > > > > On 10/16/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > > > > >
> > > > > > > > Here's my theory. We changed the weblog entry pubtime into a date field
> > > > > > > > rather than a timestamp and I bet we didn't test against PostgreSQL (I
> > > > > > > > know I didn't).
> > > > > > > >
> > > > > > > > According to the docs below, we need to do the temp table trick if we
> > > > > > > > want to change a column type in PostgreSQL:
> > > > > > > >
> > > > > > > >     http://techdocs.postgresql.org/techdocs/updatingcolumns.php
> > > > > > > >
> > > > > > > > Then, we may have data type issues. I hope PostgreSQL has a compatible
> > > > > > > > DATETIME field.
> > > > > > > >
> > > > > > > > I'm out of the office for the next couple of days, so I won't have a
> > > > > > > > chance to look into this.
> > > > > > > >
> > > > > > > > - Dave
> > > > > > > >
> > > > > > > >
> > > > > > > > On Oct 16, 2005, at 12:19 AM, Henri Yandell wrote:
> > > > > > > >
> > > > > > > > > On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > > > > > >> Is this complete? Can we close the JIRA issues for DB2 and Derby
> > > > > > > > >> support and if not, what remains to be done?
> > > > > > > > >>
> > > > > > > > >> And BTW, the 2.0 bug list is getting pretty slim.
> > > > > > > > >
> > > > > > > > > Heh, there I was thinking it had a long time to go; which explained
> > > > > > > > > the problems I was seeing where posting an entry to a new blog
> > > > > > > > > buggered it up big time.
> > > > > > > > >
> > > > > > > > > http://opensource2.atlassian.com/projects/roller/browse/ROL-844
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >


Re: DB2 and Derby support wrapup?

Posted by Elias Torres <el...@torrez.us>.
On 10/19/05, Allen Gilliland <Al...@sun.com> wrote:
> okay ... i've tested this and it works on mysql 4.1.x, but not on mysql 4.0.x.  i don't think we should drop support for mysql 4.0.x, especially because we use a 4.0.x db for one of our roller installs here at Sun.
>
> Elias,
>
> what exactly is broken about it?  does Derby/DB2/others not have a column type of DATETIME?  or does the conversion now work from TIMESTAMP to DATETIME?
>
> -- Allen

Derby/DB2 do no have a column type DATETIME, only TIMESTAMP. :-(

I've checked for Oracle/PostgreSQL and they don't have one either by a
quick search. I love mySQL because of its installation ease and
extremely easy php access to it on linux. But with the little db
experience I have, I've come to find that it's the least non-standard
database we are using in Roller. Therefore, if it was up to me, we
should start with a more standards-compliant SQL and especialize it
for the less non-standards ones. I did a quick check on the
createdb-raw.sql and we don't have any other use for DATETIME except
here.  Is there any other way to work around this problem? Can we turn
the NULL into some 0000000 date?

Elias

>
>
> On Mon, 2005-10-17 at 13:57, Elias Torres wrote:
> > On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> > > On Mon, 2005-10-17 at 13:00, Elias Torres wrote:
> > > > I have checked this with DB2 and it works fine:
> > > >
> > > > [[[
> > > > CREATE TABLE t1 (  ts1 TIMESTAMP DEFAULT NULL );
> > > > ]]]
> > >
> > > Does this work as expected with Mysql 4.0.x though?
> > >
> > > what about this paragraph from the link you gave ...
> > >
> > > "If a DEFAULT value is specified for the first TIMESTAMP column in a table, it is not ignored. The default can be CURRENT_TIMESTAMP or a constant date and time value.
> > >
> >
> > We could make pubtime be the second column. :-)
> >
> > > DEFAULT NULL is the same as DEFAULT CURRENT_TIMESTAMP for the first TIMESTAMP column. For any other TIMESTAMP column, DEFAULT NULL is treated as DEFAULT 0."
> > >
> > > I suppose we need to test this a bit.
> >
> > Let's please do that, because I don't think that there should be many
> > requirements that would make us drop support for any of the databases
> > we currently support.
> >
> > >
> > > -- Allen
> > >
> > >
> > > > Regards,
> > > >
> > > > Elias
> > > >
> > > > [1] http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html
> > > > [2] http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html
> > > >
> > > >
> > > >
> > > > On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> > > > > On Sun, 2005-10-16 at 17:12, Elias Torres wrote:
> > > > > > I just noticed that change in the schema (date field in weblogentry)
> > > > > > too and it breaks DB2 since the field type is not supported. I checked
> > > > > > documentation and datetime is also not supported on Derby either.
> > > > > > Anyways, I don't know the differences between datetime and timestamp.
> > > > > > Why does pubtime need to be a datetime as opposed to a timestamp? Is
> > > > > > this something that can be done via a customizable datatype as in
> > > > > > TEXT? Just a thought.
> > > > >
> > > > > I put in the change from Timestamp to Datetime because in Mysql if you insert a NULL value into a Timestamp column then Mysql will automatically set it to the current date/time.  The modification I made to the way pubtime works requires that we be able to save draft entries with a NULL pubtime.
> > > > >
> > > > > In Mysql the Timestamp and Datetime are the exact same thing except that a Datetime will never be set automatically.
> > > > >
> > > > > -- Allen
> > > > >
> > > > >
> > > > > >
> > > > > > Elias
> > > > > >
> > > > > > On 10/16/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > > > >
> > > > > > > Here's my theory. We changed the weblog entry pubtime into a date field
> > > > > > > rather than a timestamp and I bet we didn't test against PostgreSQL (I
> > > > > > > know I didn't).
> > > > > > >
> > > > > > > According to the docs below, we need to do the temp table trick if we
> > > > > > > want to change a column type in PostgreSQL:
> > > > > > >
> > > > > > >     http://techdocs.postgresql.org/techdocs/updatingcolumns.php
> > > > > > >
> > > > > > > Then, we may have data type issues. I hope PostgreSQL has a compatible
> > > > > > > DATETIME field.
> > > > > > >
> > > > > > > I'm out of the office for the next couple of days, so I won't have a
> > > > > > > chance to look into this.
> > > > > > >
> > > > > > > - Dave
> > > > > > >
> > > > > > >
> > > > > > > On Oct 16, 2005, at 12:19 AM, Henri Yandell wrote:
> > > > > > >
> > > > > > > > On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > > > > >> Is this complete? Can we close the JIRA issues for DB2 and Derby
> > > > > > > >> support and if not, what remains to be done?
> > > > > > > >>
> > > > > > > >> And BTW, the 2.0 bug list is getting pretty slim.
> > > > > > > >
> > > > > > > > Heh, there I was thinking it had a long time to go; which explained
> > > > > > > > the problems I was seeing where posting an entry to a new blog
> > > > > > > > buggered it up big time.
> > > > > > > >
> > > > > > > > http://opensource2.atlassian.com/projects/roller/browse/ROL-844
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>

Re: DB2 and Derby support wrapup?

Posted by Allen Gilliland <Al...@Sun.COM>.
okay ... i've tested this and it works on mysql 4.1.x, but not on mysql 4.0.x.  i don't think we should drop support for mysql 4.0.x, especially because we use a 4.0.x db for one of our roller installs here at Sun.

Elias,

what exactly is broken about it?  does Derby/DB2/others not have a column type of DATETIME?  or does the conversion now work from TIMESTAMP to DATETIME?

-- Allen


On Mon, 2005-10-17 at 13:57, Elias Torres wrote:
> On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> > On Mon, 2005-10-17 at 13:00, Elias Torres wrote:
> > > I have checked this with DB2 and it works fine:
> > >
> > > [[[
> > > CREATE TABLE t1 (  ts1 TIMESTAMP DEFAULT NULL );
> > > ]]]
> >
> > Does this work as expected with Mysql 4.0.x though?
> >
> > what about this paragraph from the link you gave ...
> >
> > "If a DEFAULT value is specified for the first TIMESTAMP column in a table, it is not ignored. The default can be CURRENT_TIMESTAMP or a constant date and time value.
> >
> 
> We could make pubtime be the second column. :-)
> 
> > DEFAULT NULL is the same as DEFAULT CURRENT_TIMESTAMP for the first TIMESTAMP column. For any other TIMESTAMP column, DEFAULT NULL is treated as DEFAULT 0."
> >
> > I suppose we need to test this a bit.
> 
> Let's please do that, because I don't think that there should be many
> requirements that would make us drop support for any of the databases
> we currently support.
> 
> >
> > -- Allen
> >
> >
> > > Regards,
> > >
> > > Elias
> > >
> > > [1] http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html
> > > [2] http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html
> > >
> > >
> > >
> > > On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> > > > On Sun, 2005-10-16 at 17:12, Elias Torres wrote:
> > > > > I just noticed that change in the schema (date field in weblogentry)
> > > > > too and it breaks DB2 since the field type is not supported. I checked
> > > > > documentation and datetime is also not supported on Derby either.
> > > > > Anyways, I don't know the differences between datetime and timestamp.
> > > > > Why does pubtime need to be a datetime as opposed to a timestamp? Is
> > > > > this something that can be done via a customizable datatype as in
> > > > > TEXT? Just a thought.
> > > >
> > > > I put in the change from Timestamp to Datetime because in Mysql if you insert a NULL value into a Timestamp column then Mysql will automatically set it to the current date/time.  The modification I made to the way pubtime works requires that we be able to save draft entries with a NULL pubtime.
> > > >
> > > > In Mysql the Timestamp and Datetime are the exact same thing except that a Datetime will never be set automatically.
> > > >
> > > > -- Allen
> > > >
> > > >
> > > > >
> > > > > Elias
> > > > >
> > > > > On 10/16/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > > >
> > > > > > Here's my theory. We changed the weblog entry pubtime into a date field
> > > > > > rather than a timestamp and I bet we didn't test against PostgreSQL (I
> > > > > > know I didn't).
> > > > > >
> > > > > > According to the docs below, we need to do the temp table trick if we
> > > > > > want to change a column type in PostgreSQL:
> > > > > >
> > > > > >     http://techdocs.postgresql.org/techdocs/updatingcolumns.php
> > > > > >
> > > > > > Then, we may have data type issues. I hope PostgreSQL has a compatible
> > > > > > DATETIME field.
> > > > > >
> > > > > > I'm out of the office for the next couple of days, so I won't have a
> > > > > > chance to look into this.
> > > > > >
> > > > > > - Dave
> > > > > >
> > > > > >
> > > > > > On Oct 16, 2005, at 12:19 AM, Henri Yandell wrote:
> > > > > >
> > > > > > > On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > > > >> Is this complete? Can we close the JIRA issues for DB2 and Derby
> > > > > > >> support and if not, what remains to be done?
> > > > > > >>
> > > > > > >> And BTW, the 2.0 bug list is getting pretty slim.
> > > > > > >
> > > > > > > Heh, there I was thinking it had a long time to go; which explained
> > > > > > > the problems I was seeing where posting an entry to a new blog
> > > > > > > buggered it up big time.
> > > > > > >
> > > > > > > http://opensource2.atlassian.com/projects/roller/browse/ROL-844
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >


Re: DB2 and Derby support wrapup?

Posted by Allen Gilliland <Al...@Sun.COM>.
On Mon, 2005-10-17 at 13:57, Elias Torres wrote:
> On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> > On Mon, 2005-10-17 at 13:00, Elias Torres wrote:
> > > I have checked this with DB2 and it works fine:
> > >
> > > [[[
> > > CREATE TABLE t1 (  ts1 TIMESTAMP DEFAULT NULL );
> > > ]]]
> >
> > Does this work as expected with Mysql 4.0.x though?
> >
> > what about this paragraph from the link you gave ...
> >
> > "If a DEFAULT value is specified for the first TIMESTAMP column in a table, it is not ignored. The default can be CURRENT_TIMESTAMP or a constant date and time value.
> >
> 
> We could make pubtime be the second column. :-)

actually ... i don't think we can for existing users.

> 
> > DEFAULT NULL is the same as DEFAULT CURRENT_TIMESTAMP for the first TIMESTAMP column. For any other TIMESTAMP column, DEFAULT NULL is treated as DEFAULT 0."
> >
> > I suppose we need to test this a bit.
> 
> Let's please do that, because I don't think that there should be many
> requirements that would make us drop support for any of the databases
> we currently support.

of course.  i don't want to drop support for any databases.

-- Allen

> 
> >
> > -- Allen
> >
> >
> > > Regards,
> > >
> > > Elias
> > >
> > > [1] http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html
> > > [2] http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html
> > >
> > >
> > >
> > > On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> > > > On Sun, 2005-10-16 at 17:12, Elias Torres wrote:
> > > > > I just noticed that change in the schema (date field in weblogentry)
> > > > > too and it breaks DB2 since the field type is not supported. I checked
> > > > > documentation and datetime is also not supported on Derby either.
> > > > > Anyways, I don't know the differences between datetime and timestamp.
> > > > > Why does pubtime need to be a datetime as opposed to a timestamp? Is
> > > > > this something that can be done via a customizable datatype as in
> > > > > TEXT? Just a thought.
> > > >
> > > > I put in the change from Timestamp to Datetime because in Mysql if you insert a NULL value into a Timestamp column then Mysql will automatically set it to the current date/time.  The modification I made to the way pubtime works requires that we be able to save draft entries with a NULL pubtime.
> > > >
> > > > In Mysql the Timestamp and Datetime are the exact same thing except that a Datetime will never be set automatically.
> > > >
> > > > -- Allen
> > > >
> > > >
> > > > >
> > > > > Elias
> > > > >
> > > > > On 10/16/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > > >
> > > > > > Here's my theory. We changed the weblog entry pubtime into a date field
> > > > > > rather than a timestamp and I bet we didn't test against PostgreSQL (I
> > > > > > know I didn't).
> > > > > >
> > > > > > According to the docs below, we need to do the temp table trick if we
> > > > > > want to change a column type in PostgreSQL:
> > > > > >
> > > > > >     http://techdocs.postgresql.org/techdocs/updatingcolumns.php
> > > > > >
> > > > > > Then, we may have data type issues. I hope PostgreSQL has a compatible
> > > > > > DATETIME field.
> > > > > >
> > > > > > I'm out of the office for the next couple of days, so I won't have a
> > > > > > chance to look into this.
> > > > > >
> > > > > > - Dave
> > > > > >
> > > > > >
> > > > > > On Oct 16, 2005, at 12:19 AM, Henri Yandell wrote:
> > > > > >
> > > > > > > On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > > > >> Is this complete? Can we close the JIRA issues for DB2 and Derby
> > > > > > >> support and if not, what remains to be done?
> > > > > > >>
> > > > > > >> And BTW, the 2.0 bug list is getting pretty slim.
> > > > > > >
> > > > > > > Heh, there I was thinking it had a long time to go; which explained
> > > > > > > the problems I was seeing where posting an entry to a new blog
> > > > > > > buggered it up big time.
> > > > > > >
> > > > > > > http://opensource2.atlassian.com/projects/roller/browse/ROL-844
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >


Re: DB2 and Derby support wrapup?

Posted by Elias Torres <el...@torrez.us>.
On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> On Mon, 2005-10-17 at 13:00, Elias Torres wrote:
> > I have checked this with DB2 and it works fine:
> >
> > [[[
> > CREATE TABLE t1 (  ts1 TIMESTAMP DEFAULT NULL );
> > ]]]
>
> Does this work as expected with Mysql 4.0.x though?
>
> what about this paragraph from the link you gave ...
>
> "If a DEFAULT value is specified for the first TIMESTAMP column in a table, it is not ignored. The default can be CURRENT_TIMESTAMP or a constant date and time value.
>

We could make pubtime be the second column. :-)

> DEFAULT NULL is the same as DEFAULT CURRENT_TIMESTAMP for the first TIMESTAMP column. For any other TIMESTAMP column, DEFAULT NULL is treated as DEFAULT 0."
>
> I suppose we need to test this a bit.

Let's please do that, because I don't think that there should be many
requirements that would make us drop support for any of the databases
we currently support.

>
> -- Allen
>
>
> > Regards,
> >
> > Elias
> >
> > [1] http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html
> > [2] http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html
> >
> >
> >
> > On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> > > On Sun, 2005-10-16 at 17:12, Elias Torres wrote:
> > > > I just noticed that change in the schema (date field in weblogentry)
> > > > too and it breaks DB2 since the field type is not supported. I checked
> > > > documentation and datetime is also not supported on Derby either.
> > > > Anyways, I don't know the differences between datetime and timestamp.
> > > > Why does pubtime need to be a datetime as opposed to a timestamp? Is
> > > > this something that can be done via a customizable datatype as in
> > > > TEXT? Just a thought.
> > >
> > > I put in the change from Timestamp to Datetime because in Mysql if you insert a NULL value into a Timestamp column then Mysql will automatically set it to the current date/time.  The modification I made to the way pubtime works requires that we be able to save draft entries with a NULL pubtime.
> > >
> > > In Mysql the Timestamp and Datetime are the exact same thing except that a Datetime will never be set automatically.
> > >
> > > -- Allen
> > >
> > >
> > > >
> > > > Elias
> > > >
> > > > On 10/16/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > >
> > > > > Here's my theory. We changed the weblog entry pubtime into a date field
> > > > > rather than a timestamp and I bet we didn't test against PostgreSQL (I
> > > > > know I didn't).
> > > > >
> > > > > According to the docs below, we need to do the temp table trick if we
> > > > > want to change a column type in PostgreSQL:
> > > > >
> > > > >     http://techdocs.postgresql.org/techdocs/updatingcolumns.php
> > > > >
> > > > > Then, we may have data type issues. I hope PostgreSQL has a compatible
> > > > > DATETIME field.
> > > > >
> > > > > I'm out of the office for the next couple of days, so I won't have a
> > > > > chance to look into this.
> > > > >
> > > > > - Dave
> > > > >
> > > > >
> > > > > On Oct 16, 2005, at 12:19 AM, Henri Yandell wrote:
> > > > >
> > > > > > On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > > >> Is this complete? Can we close the JIRA issues for DB2 and Derby
> > > > > >> support and if not, what remains to be done?
> > > > > >>
> > > > > >> And BTW, the 2.0 bug list is getting pretty slim.
> > > > > >
> > > > > > Heh, there I was thinking it had a long time to go; which explained
> > > > > > the problems I was seeing where posting an entry to a new blog
> > > > > > buggered it up big time.
> > > > > >
> > > > > > http://opensource2.atlassian.com/projects/roller/browse/ROL-844
> > > > > >
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>
>

Re: DB2 and Derby support wrapup?

Posted by Allen Gilliland <Al...@Sun.COM>.
On Mon, 2005-10-17 at 13:00, Elias Torres wrote:
> I have checked this with DB2 and it works fine:
> 
> [[[
> CREATE TABLE t1 (  ts1 TIMESTAMP DEFAULT NULL );
> ]]]

Does this work as expected with Mysql 4.0.x though?  

what about this paragraph from the link you gave ...

"If a DEFAULT value is specified for the first TIMESTAMP column in a table, it is not ignored. The default can be CURRENT_TIMESTAMP or a constant date and time value. 

DEFAULT NULL is the same as DEFAULT CURRENT_TIMESTAMP for the first TIMESTAMP column. For any other TIMESTAMP column, DEFAULT NULL is treated as DEFAULT 0."

I suppose we need to test this a bit.

-- Allen


> Regards,
> 
> Elias
> 
> [1] http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html
> [2] http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html
> 
> 
> 
> On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> > On Sun, 2005-10-16 at 17:12, Elias Torres wrote:
> > > I just noticed that change in the schema (date field in weblogentry)
> > > too and it breaks DB2 since the field type is not supported. I checked
> > > documentation and datetime is also not supported on Derby either.
> > > Anyways, I don't know the differences between datetime and timestamp.
> > > Why does pubtime need to be a datetime as opposed to a timestamp? Is
> > > this something that can be done via a customizable datatype as in
> > > TEXT? Just a thought.
> >
> > I put in the change from Timestamp to Datetime because in Mysql if you insert a NULL value into a Timestamp column then Mysql will automatically set it to the current date/time.  The modification I made to the way pubtime works requires that we be able to save draft entries with a NULL pubtime.
> >
> > In Mysql the Timestamp and Datetime are the exact same thing except that a Datetime will never be set automatically.
> >
> > -- Allen
> >
> >
> > >
> > > Elias
> > >
> > > On 10/16/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > >
> > > > Here's my theory. We changed the weblog entry pubtime into a date field
> > > > rather than a timestamp and I bet we didn't test against PostgreSQL (I
> > > > know I didn't).
> > > >
> > > > According to the docs below, we need to do the temp table trick if we
> > > > want to change a column type in PostgreSQL:
> > > >
> > > >     http://techdocs.postgresql.org/techdocs/updatingcolumns.php
> > > >
> > > > Then, we may have data type issues. I hope PostgreSQL has a compatible
> > > > DATETIME field.
> > > >
> > > > I'm out of the office for the next couple of days, so I won't have a
> > > > chance to look into this.
> > > >
> > > > - Dave
> > > >
> > > >
> > > > On Oct 16, 2005, at 12:19 AM, Henri Yandell wrote:
> > > >
> > > > > On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > > >> Is this complete? Can we close the JIRA issues for DB2 and Derby
> > > > >> support and if not, what remains to be done?
> > > > >>
> > > > >> And BTW, the 2.0 bug list is getting pretty slim.
> > > > >
> > > > > Heh, there I was thinking it had a long time to go; which explained
> > > > > the problems I was seeing where posting an entry to a new blog
> > > > > buggered it up big time.
> > > > >
> > > > > http://opensource2.atlassian.com/projects/roller/browse/ROL-844
> > > > >
> > > >
> > > >
> > > >
> >
> >
> >


Re: DB2 and Derby support wrapup?

Posted by Elias Torres <el...@torrez.us>.
Excellent. This is good to know. Unfortunately, this breaks

BTW, I found this in the docs [1]:

[[[
 Beginning with MySQL 4.1.6, you can include the NULL attribute in the
definition of a TIMESTAMP column to allow the column to contain NULL
values. For example:

CREATE TABLE t (
  ts1 TIMESTAMP NULL DEFAULT NULL,
  ts2 TIMESTAMP NULL DEFAULT 0,
  ts3 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
);

Before MySQL 4.1.6 (and even as of 4.1.6 if the NULL attribute is not
specified), setting the column to NULL sets it to the current
timestamp. Note that a TIMESTAMP column which allows NULL values does
not take on the current timestamp unless either its default value is
defined as CURRENT_TIMESTAMP, or either NOW() or CURRENT_TIMESTAMP is
inserted into the column. In other words, a TIMESTAMP column defined
as NULL auto-updates only if it defined using a definition such as the
following:

CREATE TABLE t (ts NULL DEFAULT CURRENT_TIMESTAMP);

Otherwise — that is, if the TIMESTAMP column is defined using NULL but
not using DEFAULT TIMESTAMP, as shown here:

CREATE TABLE t1 (ts NULL DEFAULT NULL);
CREATE TABLE t2 (ts NULL DEFAULT '0000-00-00 00:00:00');

— then you must explicitly insert a value corresponding to the current
date and time, for example:

INSERT INTO t1 VALUES (NOW());
INSERT INTO t2 VALUES (CURRENT_TIMESTAMP);
]]]

I have checked this with DB2 and it works fine:

[[[
CREATE TABLE t1 (  ts1 TIMESTAMP DEFAULT NULL );
]]]

Regards,

Elias

[1] http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html
[2] http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html



On 10/17/05, Allen Gilliland <Al...@sun.com> wrote:
> On Sun, 2005-10-16 at 17:12, Elias Torres wrote:
> > I just noticed that change in the schema (date field in weblogentry)
> > too and it breaks DB2 since the field type is not supported. I checked
> > documentation and datetime is also not supported on Derby either.
> > Anyways, I don't know the differences between datetime and timestamp.
> > Why does pubtime need to be a datetime as opposed to a timestamp? Is
> > this something that can be done via a customizable datatype as in
> > TEXT? Just a thought.
>
> I put in the change from Timestamp to Datetime because in Mysql if you insert a NULL value into a Timestamp column then Mysql will automatically set it to the current date/time.  The modification I made to the way pubtime works requires that we be able to save draft entries with a NULL pubtime.
>
> In Mysql the Timestamp and Datetime are the exact same thing except that a Datetime will never be set automatically.
>
> -- Allen
>
>
> >
> > Elias
> >
> > On 10/16/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > >
> > > Here's my theory. We changed the weblog entry pubtime into a date field
> > > rather than a timestamp and I bet we didn't test against PostgreSQL (I
> > > know I didn't).
> > >
> > > According to the docs below, we need to do the temp table trick if we
> > > want to change a column type in PostgreSQL:
> > >
> > >     http://techdocs.postgresql.org/techdocs/updatingcolumns.php
> > >
> > > Then, we may have data type issues. I hope PostgreSQL has a compatible
> > > DATETIME field.
> > >
> > > I'm out of the office for the next couple of days, so I won't have a
> > > chance to look into this.
> > >
> > > - Dave
> > >
> > >
> > > On Oct 16, 2005, at 12:19 AM, Henri Yandell wrote:
> > >
> > > > On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > > >> Is this complete? Can we close the JIRA issues for DB2 and Derby
> > > >> support and if not, what remains to be done?
> > > >>
> > > >> And BTW, the 2.0 bug list is getting pretty slim.
> > > >
> > > > Heh, there I was thinking it had a long time to go; which explained
> > > > the problems I was seeing where posting an entry to a new blog
> > > > buggered it up big time.
> > > >
> > > > http://opensource2.atlassian.com/projects/roller/browse/ROL-844
> > > >
> > >
> > >
> > >
>
>
>

Re: DB2 and Derby support wrapup?

Posted by Allen Gilliland <Al...@Sun.COM>.
On Sun, 2005-10-16 at 17:12, Elias Torres wrote:
> I just noticed that change in the schema (date field in weblogentry)
> too and it breaks DB2 since the field type is not supported. I checked
> documentation and datetime is also not supported on Derby either.
> Anyways, I don't know the differences between datetime and timestamp.
> Why does pubtime need to be a datetime as opposed to a timestamp? Is
> this something that can be done via a customizable datatype as in
> TEXT? Just a thought.

I put in the change from Timestamp to Datetime because in Mysql if you insert a NULL value into a Timestamp column then Mysql will automatically set it to the current date/time.  The modification I made to the way pubtime works requires that we be able to save draft entries with a NULL pubtime.

In Mysql the Timestamp and Datetime are the exact same thing except that a Datetime will never be set automatically.

-- Allen


> 
> Elias
> 
> On 10/16/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> >
> > Here's my theory. We changed the weblog entry pubtime into a date field
> > rather than a timestamp and I bet we didn't test against PostgreSQL (I
> > know I didn't).
> >
> > According to the docs below, we need to do the temp table trick if we
> > want to change a column type in PostgreSQL:
> >
> >     http://techdocs.postgresql.org/techdocs/updatingcolumns.php
> >
> > Then, we may have data type issues. I hope PostgreSQL has a compatible
> > DATETIME field.
> >
> > I'm out of the office for the next couple of days, so I won't have a
> > chance to look into this.
> >
> > - Dave
> >
> >
> > On Oct 16, 2005, at 12:19 AM, Henri Yandell wrote:
> >
> > > On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> > >> Is this complete? Can we close the JIRA issues for DB2 and Derby
> > >> support and if not, what remains to be done?
> > >>
> > >> And BTW, the 2.0 bug list is getting pretty slim.
> > >
> > > Heh, there I was thinking it had a long time to go; which explained
> > > the problems I was seeing where posting an entry to a new blog
> > > buggered it up big time.
> > >
> > > http://opensource2.atlassian.com/projects/roller/browse/ROL-844
> > >
> >
> >
> >


Re: DB2 and Derby support wrapup?

Posted by Elias Torres <el...@torrez.us>.
I just noticed that change in the schema (date field in weblogentry)
too and it breaks DB2 since the field type is not supported. I checked
documentation and datetime is also not supported on Derby either.
Anyways, I don't know the differences between datetime and timestamp.
Why does pubtime need to be a datetime as opposed to a timestamp? Is
this something that can be done via a customizable datatype as in
TEXT? Just a thought.

Elias

On 10/16/05, Dave Johnson <da...@rollerweblogger.org> wrote:
>
> Here's my theory. We changed the weblog entry pubtime into a date field
> rather than a timestamp and I bet we didn't test against PostgreSQL (I
> know I didn't).
>
> According to the docs below, we need to do the temp table trick if we
> want to change a column type in PostgreSQL:
>
>     http://techdocs.postgresql.org/techdocs/updatingcolumns.php
>
> Then, we may have data type issues. I hope PostgreSQL has a compatible
> DATETIME field.
>
> I'm out of the office for the next couple of days, so I won't have a
> chance to look into this.
>
> - Dave
>
>
> On Oct 16, 2005, at 12:19 AM, Henri Yandell wrote:
>
> > On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> >> Is this complete? Can we close the JIRA issues for DB2 and Derby
> >> support and if not, what remains to be done?
> >>
> >> And BTW, the 2.0 bug list is getting pretty slim.
> >
> > Heh, there I was thinking it had a long time to go; which explained
> > the problems I was seeing where posting an entry to a new blog
> > buggered it up big time.
> >
> > http://opensource2.atlassian.com/projects/roller/browse/ROL-844
> >
>
>
>

Re: DB2 and Derby support wrapup?

Posted by Dave Johnson <da...@rollerweblogger.org>.
Here's my theory. We changed the weblog entry pubtime into a date field 
rather than a timestamp and I bet we didn't test against PostgreSQL (I 
know I didn't).

According to the docs below, we need to do the temp table trick if we 
want to change a column type in PostgreSQL:

    http://techdocs.postgresql.org/techdocs/updatingcolumns.php

Then, we may have data type issues. I hope PostgreSQL has a compatible 
DATETIME field.

I'm out of the office for the next couple of days, so I won't have a 
chance to look into this.

- Dave


On Oct 16, 2005, at 12:19 AM, Henri Yandell wrote:

> On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
>> Is this complete? Can we close the JIRA issues for DB2 and Derby
>> support and if not, what remains to be done?
>>
>> And BTW, the 2.0 bug list is getting pretty slim.
>
> Heh, there I was thinking it had a long time to go; which explained
> the problems I was seeing where posting an entry to a new blog
> buggered it up big time.
>
> http://opensource2.atlassian.com/projects/roller/browse/ROL-844
>


Re: DB2 and Derby support wrapup?

Posted by Anil Gangolli <an...@busybuddha.org>.
I commented on the bug.  This one looks like an old bug in the 
PostgreSQL drivers.  Try the latest ?
--a.

Henri Yandell wrote:

>On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
>  
>
>>Is this complete? Can we close the JIRA issues for DB2 and Derby
>>support and if not, what remains to be done?
>>
>>And BTW, the 2.0 bug list is getting pretty slim.
>>    
>>
>
>Heh, there I was thinking it had a long time to go; which explained
>the problems I was seeing where posting an entry to a new blog
>buggered it up big time.
>
>http://opensource2.atlassian.com/projects/roller/browse/ROL-844
>
>
>  
>


Re: DB2 and Derby support wrapup?

Posted by Henri Yandell <fl...@gmail.com>.
On 10/12/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> Is this complete? Can we close the JIRA issues for DB2 and Derby
> support and if not, what remains to be done?
>
> And BTW, the 2.0 bug list is getting pretty slim.

Heh, there I was thinking it had a long time to go; which explained
the problems I was seeing where posting an entry to a new blog
buggered it up big time.

http://opensource2.atlassian.com/projects/roller/browse/ROL-844

Re: DB2 and Derby support wrapup?

Posted by Allen Gilliland <Al...@Sun.COM>.
On Wed, 2005-10-12 at 12:51, Dave Johnson wrote:
> Is this complete? Can we close the JIRA issues for DB2 and Derby 
> support and if not, what remains to be done?
> 
> And BTW, the 2.0 bug list is getting pretty slim.

true, which means that we should probably try and get 1.3 out the door ASAP since we don't really want to release them both at the same time.

-- Allen

> 
> - Dave
>