I am getting the following error message from the google_contacts plugin. This is from the RC errors log. I thought it was due to permissions on the DB but the table has the same perms as everything else.
[13-Apr-2010 12:20:50] MDB2 Error: insufficient permissions (-27): _doQuery: [Error message: Could not execute statement]
[Last executed query: INSERT INTO google_contacts
(user_id, changed, del, "name", "email", "firstname", "surname", "vcard")
VALUES (1, now(), 0, 'John Smith (
[email protected])', '
[email protected]', 'John', 'Smith', '')]
[Native message: ERROR: permission denied for sequence collected_contact_ids]
Can anyone help?
Could you please the SQL script you have used to create the table?
Yes, I used the one that came with the plugin for Postgres
--
-- Sequence "collected_contact_ids"
-- Name: collected_contact_ids; Type: SEQUENCE; Schema: public; Owner: roundcube
--
CREATE SEQUENCE collected_contact_ids
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Table "google_contacts"
-- Name: google_contacts; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE google_contacts (
contact_id integer DEFAULT nextval('collected_contact_ids'::text) PRIMARY KEY,
user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
changed timestamp with time zone DEFAULT now() NOT NULL,
del smallint DEFAULT 0 NOT NULL,
name character varying(128) DEFAULT ''::character varying NOT NULL,
email character varying(128) DEFAULT ''::character varying NOT NULL,
firstname character varying(128) DEFAULT ''::character varying NOT NULL,
surname character varying(128) DEFAULT ''::character varying NOT NULL,
vcard text
);
CREATE INDEX google_contacts_user_id_idx ON google_contacts (user_id);
I'm not familiar with PostGres but it looks like the original script is from automated_addressbook and the contributor forgot to replace 'collected_contacts' by 'google_contacts'.
Yes, that was the issue. Thank you. I have changed the php file and updated the database table accordingly.