[pgadmin-support] Porting from MySQL to postgreSQL. Question RE: Sequence Dependencies

2007-09-12 Thread Robert Starr
Hi all, this is my first post. I have a quick question, and if I have it all wrong I apologise in advance, I'm still trying to get used to a 'real' SQL after moving away from MySQL. I am using pgAdminIII and have created a table called 'clients' and filled it with data. I then tried to edit

[pgadmin-support] ERROR: duplicate key violates unique constraint "client_alerts_PK"

2007-09-12 Thread Robert Starr
Hi all, I am having an issue, where I create a new table, setup the constraints for Auto Increment and Primary Key etc, then manually add a bunch of data using pgadmin similar to the following: insert into clients_alerts (id, client_id, alert_message, alert_complete, date, staff_id) values('1'

[pgadmin-support] restoring a backup and maintaining dependencies?

2007-09-12 Thread Robert Starr
Hi again :) I have saved out these commands: CREATE TABLE group_items ( id serial NOT NULL, group_id integer, group_type text, item_id integer, visible integer, CONSTRAINT "group_items_PK" PRIMARY KEY (id) ) WITHOUT OIDS; ALTER TABLE group_items OWNER TO postgres; CREATE SEQUENCE group_i

Re: [pgadmin-support] restoring a backup and maintaining dependencies?

2007-09-12 Thread Robert Starr
. pgadmin is just a front end to the database, it generates the same sql that you would write manually. If your table is group_items, name your sequence group_items_seq Laurent On 9/12/07, Robert Starr <[EMAIL PROTECTED]> wrote: Hi again :) I have saved out these commands: CREATE