Modify

Opened 8 years ago

Closed 8 years ago

#861 closed defect (fixed)

postgres SQL error

Reported by: beardens@… Owned by: bobbysmith007
Priority: high Component: TimingAndEstimationPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.10

Description

Hi, I just tried this with postgres (trac 0.10) and got this error:

Report execution failed: ERROR: subquery in FROM must have an alias HINT: For example, FROM (SELECT ...) [AS] foo.

(I notice your plugin page says "I am willing to help someone get this working
for postgres backend, but dont currently have postgres to test on." If you
make an update, I'll try again and give you feedback.)

Attachments (0)

Change History (6)

comment:1 Changed 8 years ago by bobbysmith007

I will start working on this next week. Unfortunately I am busy until then.

comment:2 Changed 8 years ago by bobbysmith007

Please try now. I think that I have the report sql updated to work in postgre now.

See changeset:1496

If this is verified to be working, then I think that the plugin officially works with alternate database backends

comment:3 Changed 8 years ago by frederik.ferner@…

Hi,
I had the same problem with an older version (0.2.0 or 0.2.1 IIRC) a week ago or so. With the current version (0.2.4) of this plugin, I get the following SQL errro when trying to generate any report:

Report execution failed: ERROR: function sum(text) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts.

My trac version is 0.10.1 if it makes any difference.

Thanks.

comment:4 Changed 8 years ago by bobbysmith007

Thanks, that is another error caused because postgres is strongly typed where as sqlite is not. I will try to find a cross database way to use the sum function.

Russ

comment:5 Changed 8 years ago by bobbysmith007

Ok I fixed the sums to cast as real before summing. This works but is not necessary in SQL lite. When one of the postgres users confirms that it now works, I will close this ticket. I am hopeful that this is the last change, but we shall see.

Also, please keep an eye out for rounding error. I dont see any in sqlite, but from what I was reading real is sometimes interpretted as a single float. I don't think we are doing anything that would cause excessive round error, but its something to watch for.

While doing this I noticed that after my last postgre change, the rollups were appearing at the top rather than the bottom. This should also be fixed in the most recent version (0.2.5)

see changeset:1571

Thanks for your help making this plugin better,
Russ

comment:6 Changed 8 years ago by bobbysmith007

  • Resolution set to fixed
  • Status changed from new to closed

More work on this is on
ticket:927

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.