Modify

Opened 17 years ago

Closed 17 years ago

#861 closed defect (fixed)

postgres SQL error

Reported by: beardens@… Owned by: Russ Tyndall
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 17 years ago by Russ Tyndall

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

comment:2 Changed 17 years ago by Russ Tyndall

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 17 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 17 years ago by Russ Tyndall

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 17 years ago by Russ Tyndall

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 17 years ago by Russ Tyndall

Resolution: fixed
Status: newclosed

More work on this is on ticket:927

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Russ Tyndall.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.