[RDBO] Candidate for RDBO?

2008-01-30 Thread Fred Cox
I've got a Postgresql DBI select: SELECT COUNT(*) AS voters, SUM(liked) AS liked, SUM(liked) / CAST( COUNT(*) AS real ) AS ratio FROM review_votes WHERE reviewid=? that works well, but I wasn't sure whether it would be practical to try to do this with RDBO. I know the query builder works

[RDBO] Postgresql default value for timestamp causes RDBO failure

2007-06-11 Thread Fred Cox
insert() - Invalid default timestamp: '(now() + '21 days'::interval)' at /usr/local/lib/perl5/site_perl/5.8.8/Rose/DB/Object.pm line 1106 The column definition looks like this: tsexpire | timestamp without time zone | not null default (now() + '21 days'::interval) Should I expect valid

Re: [RDBO] SQLite ATTACH supported by RDB/RDBO?

2007-03-17 Thread Fred Cox
--- John Siracusa [EMAIL PROTECTED] wrote: On 3/16/07 3:34 PM, Fred Cox wrote: Ideally, I would like to have RDB know to ATTACH the second database and treat the two files as one. From what I can tell of the SQLite database, in the case where the table names are unique, the only

[RDBO] SQLite ATTACH supported by RDB/RDBO?

2007-03-16 Thread Fred Cox
We have a fairly large 3rd party database (850MB) which we'd like to keep pure, because it can be updated weekly by the vendor. We also have data we maintain that references the 3rd party data. Ideally, I would like to have RDB know to ATTACH the second database and treat the two files as one.

[RDBO] Complex update, need hand coded SQL?

2007-02-28 Thread Fred Cox
I probably should be able to figure this out on my own, but if I'm barking up the wrong tree, I don't want to spend the time, and searching hasn't helped. I want to update a row in the table using the result of a subselect as a value in one round trip. In DBI, I would do this: prepare( 'update

Re: [RDBO] Loader primary key confusion

2007-02-27 Thread Fred Cox
--- John Siracusa [EMAIL PROTECTED] wrote: On 2/27/07, Fred Cox [EMAIL PROTECTED] wrote: Version 761 (latest in FreeBSD ports) RDBO::Loader chooses the wrong primary key for this PostgreSQL table: Can you post the CREATE TABLE statement CREATE TABLE ratings ( userid integer NOT NULL

Re: [RDBO] Loader primary key confusion

2007-02-27 Thread Fred Cox
--- John Siracusa [EMAIL PROTECTED] wrote: On 2/27/07, Fred Cox [EMAIL PROTECTED] wrote: Version 761 (latest in FreeBSD ports) RDBO::Loader chooses the wrong primary key for this PostgreSQL table: The column name year is auto-quoted (probably a reserved word) and wasn't being unquoted