Maybe this is the problem, but it is a view, not an actual table. The actual 'table' is a join on a few tables -- the data is stored for another web application (in its own weird format) and I'd like to access it externally via SOGo if possible. If it helps, this is the line I use to create it:

create view sogoaddress as SELECT (contacts.first_name::text || ''::text) || contacts.last_name::text AS c_cn, contacts.first_name AS c_name, contacts.id as c_uid, (contacts.first_name::text || ' '::text) || contacts.last_name::text AS cn, contacts.first_name AS givenname, contacts.last_name AS sn, contacts.title, contacts.department, contacts.phone_home AS homephone, contacts.phone_mobile AS mobile, contacts.phone_work AS telephonenumber, contacts.phone_fax AS fax, contacts.primary_address_street AS streetaddress, contacts.primary_address_city AS locality, contacts.primary_address_state AS st, contacts.primary_address_postalcode AS zip, contacts.primary_address_country AS countryname, contacts.birthdate, email_addresses.email_address AS mail
   FROM contacts
LEFT JOIN email_addr_bean_rel ON email_addr_bean_rel.bean_id = contacts.id LEFT JOIN email_addresses ON email_addresses.id = email_addr_bean_rel.email_address_id
  WHERE contacts.last_name::text = 'ForceZeroRecordsReturned'::text;

Also in case it is relevant, here's the output from psql's "\d sogoaddress"

              View "sogoaddress"
     Column      |          Type          | Modifiers
-----------------+------------------------+-----------
 c_cn            | text                   |
 c_name          | character varying(100) |
 c_uid           | character(36)          |
 cn              | text                   |
 givenname       | character varying(100) |
 sn              | character varying(100) |
 title           | character varying(100) |
 department      | character varying(255) |
 homephone       | character varying(25)  |
 mobile          | character varying(25)  |
 telephonenumber | character varying(25)  |
 fax             | character varying(25)  |
 streetaddress   | character varying(150) |
 locality        | character varying(100) |
 st              | character varying(100) |
 zip             | character varying(20)  |
 countryname     | character varying(255) |
 birthdate       | date                   |
 mail            | character varying(255) |



Let me know if there is any other information that may be useful.

Thanks,
Ben




On 1/5/2011 4:34 PM, Ludovic Marcotte wrote:
On 11-01-05 6:31 PM, Ben wrote:
I was playing around with the view I created to for addressbook. If I create the view such that there are no records:

inventory=> select * from sogoaddress;
c_cn | c_name | c_uid | cn | givenname | sn | title | department | homephone | mobile | telephonenumber | fax | streetaddress | locality | st | zip | countryname | birthdate | mail ------+--------+-------+----+-----------+----+-------+------------+-----------+--------+-----------------+-----+---------------+----------+----+-----+-------------+-----------+------
(0 rows)

Then I don't see any errors in SOGO, but when I try to access the addressbook, sogo locks up using 100% CPU. This is on 1.3.4. I'm guessing I'm doing something dumb. Is anyone else using sql as an addressbook (not authentication and addressbook)? Could you send me that part of the .GNUStepDefaults file? Any place else to look -- seems like a simple sql query returning zero rows shouldn't thrash SOGo.
Send over the CREATE TABLE command you used to have this table and we'll try it.

Regards,


--
[email protected]
https://inverse.ca/sogo/lists

Reply via email to