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

2007-09-12 Thread Charlie Clark
Am 13.09.2007 um 05:24 schrieb 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. Welcome aboard! This list is actually for pgAdmin which is j

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

2007-09-12 Thread Laurent Yaish
my bad... I missed the post about the default value.. On 9/12/07, Guillaume Lelarge <[EMAIL PROTECTED]> wrote: > Laurent Yaish a écrit : > > Hi Rob, > > > > In your insert, do not explicitly specify a value for the primary key, > > instead use NEXTVAL('client_alerts_seq') which will return the ne

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

2007-09-12 Thread Guillaume Lelarge
Laurent Yaish a écrit : > Hi Rob, > > In your insert, do not explicitly specify a value for the primary key, > instead use NEXTVAL('client_alerts_seq') which will return the next > valid value and increment the sequence. > > i.e: > insert into clients_alerts (id, client_id, alert_message, > aler

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

2007-09-12 Thread Robert Starr
Title: Surrender Dorothy Thank you so much, I wondered that.   Seemed over simple ;) as I thought there must be an explicit link rather than a naming convention. :)  Thanks again. Rob Laurent Yaish wrote: There is no difference between running this script and using the pgadmin gui. pg

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

2007-09-12 Thread Laurent Yaish
There is no difference between running this script and using the pgadmin gui. 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]

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

2007-09-12 Thread Laurent Yaish
Hi Rob, In your insert, do not explicitly specify a value for the primary key, instead use NEXTVAL('client_alerts_seq') which will return the next valid value and increment the sequence. i.e: insert into clients_alerts (id, client_id, alert_message, alert_complete, date, staff_id) values(NEXTVAL

[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

[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] 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] pgAdmin III v1.8.0 Beta 5 released

2007-09-12 Thread Dave Page
I'm pleased to announce the release of the fifth (and hopefully final) beta version of pgAdmin III v1.8.0. pgAdmin is the leading graphical administration and development tool for PostgreSQL, EnterpriseDB and most other PostgreSQL-derived DBMSs. It can be used on Windows, Linux, FreeBSD, Mac and