# Bugs #2927: PostgreSQL Error when viewsing history

**URL:** <https://help.egroupware.org/t/bugs-2927-postgresql-error-when-viewsing-history/46891>\
**Category:** eGW-tracker\
**Created:** [April 11, 2011, 3:31pm UTC](https://help.egroupware.org/t/bugs-2927-postgresql-error-when-viewsing-history/46891 "2011-04-11T15:31:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tracker-3](https://help.egroupware.org/letter_avatar_proxy/v4/letter/t/d07c76/32.png) [@tracker-3](https://help.egroupware.org/u/tracker-3)\
**Post date:** [April 11, 2011, 3:31pm UTC](https://help.egroupware.org/t/bugs-2927-postgresql-error-when-viewsing-history/46891/1 "2011-04-11T15:31:28Z")

</div>

Ticket modified by Klaus Leithoff at 2011/04/11 17:31  
Tracking System: Bugs  
Category: Wiki  
Version: Trunk  
Status: Open  
Resolution: None  
Completed: 10%  
Priority: 5 - medium  
Created By: Lars Boegild Thomsen  
Created on: 2011/04/06 02:57  
Assigned to: Ralf Becker  
Summary: #2927 - PostgreSQL Error when viewsing history  
In trunk as of yesterday:

Invalid SQL: SELECT wiki\_rate\_time,wiki\_rate\_viewLimit,wiki\_rate\_searchLimit,wiki\_rate\_editLimit FROM egw\_wiki\_rate WHERE wiki\_rate\_ip=‘193.89.191.35’:  
ERROR: column “wiki\_rate\_viewlimit” does not exist  
LINE 1: SELECT wiki\_rate\_time,wiki\_rate\_viewLimit,wiki\_rate\_searchLi…

Comment by Klaus Leithoff at 2011/04/11 17:31:  
ralf is fixing it.  
Comment by Klaus Leithoff at 2011/04/11 17:14:  
Postgres seems to require those columns quoted.  
As this query does run:  
SELECT wiki\_rate\_time,“wiki\_rate\_viewLimit”,“wiki\_rate\_searchLimit”,“wiki\_rate\_editLimit” FROM egw\_wiki\_rate WHERE wiki\_rate\_ip=‘127.0.0.1’;  
Comment by Klaus Leithoff at 2011/04/07 15:53:  
postgres: I noticed.  
Strange. I will check what seems to be wrong.

Comment by Lars Boegild Thomsen at 2011/04/07 15:33:  
Yes sure:

egroupware=\> \d egw\_wiki\_rate  
Table "public.egw\_wiki\_rate"  
Column | Type | Modifiers  
-----------------------±----------------------±---------------------------------------  
wiki\_rate\_ip | character varying(20) | not null default ‘’::character varying  
wiki\_rate\_time | integer |  
wiki\_rate\_viewLimit | smallint |  
wiki\_rate\_searchLimit | smallint |  
wiki\_rate\_editLimit | smallint |  
Indexes:  
“egw\_wiki\_rate\_pkey” PRIMARY KEY, btree (wiki\_rate\_ip)

I noticed the table is defined as viewLimit but the error say viewlimit - but if I am not mistaken sql names are only case sensitive if quoted.

Notice this is postgresql and not mysql.  
Comment by Klaus Leithoff at 2011/04/06 16:35:  
Could you check if the table is available as defined in tables\_current?

Or for example here:  
CREATE TABLE IF NOT EXISTS `egw_wiki_rate` (  
`wiki_rate_ip` varchar(20) NOT NULL,  
`wiki_rate_time` int(11) DEFAULT NULL,  
`wiki_rate_viewLimit` smallint(6) DEFAULT NULL,  
`wiki_rate_searchLimit` smallint(6) DEFAULT NULL,  
`wiki_rate_editLimit` smallint(6) DEFAULT NULL,  
PRIMARY KEY (`wiki_rate_ip`)  
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

linked entries:  
[http://www.egroupware.org/egroupware/index.php?menuaction=tracker.tracker\_ui.edit&tr\_id=2927&no\_popup=1](http://www.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=2927&no_popup=1)
