Обсуждение: postgresql not updating the sequence
hi everyone, i ve created a table with id and datatype of id is serial and i ve created a sequence on that table whenever i insert the new row values the id is not being incremented and it is giving the exception entityalreadyexists. pls help me thanks and regards, kosna. -- View this message in context: http://postgresql.1045698.n5.nabble.com/postgresql-not-updating-the-sequence-tp4369180p4369180.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On 04/05/2011 08:10, kosna wrote: > hi everyone, > > i ve created a table with id and datatype of id is serial > and i ve created a sequence on that table > whenever i insert the new row values the id is not being incremented and it > is giving the exception entityalreadyexists. pls help me > thanks and regards, > kosna. Can you show us your query? Also, are you using any sort of framework or ORM, or just sending the query directly to the server? The more detail you give, the better people will be able to help you. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie
2011/5/4 kosna <skosna@yahoo.com>: > hi everyone, > > i ve created a table with id and datatype of id is serial > and i ve created a sequence on that table > whenever i insert the new row values the id is not being incremented and it > is giving the exception entityalreadyexists. pls help me > thanks and regards, > kosna. Could you send us the result of \d your_table ? The column has a 'nextval' ? -- Dickson S. Guedes mail/xmpp: guedes@guedesoft.net - skype: guediz http://guedesoft.net - http://www.postgresql.org.br
2011/5/4 Kosna Sridhar <skosna@yahoo.com>: > > actually i resolved the problem thanks for quick response Great! For history and reference of this list could you tell us how with a "Reply all"? regards -- Dickson S. Guedes mail/xmpp: guedes@guedesoft.net - skype: guediz http://guedesoft.net - http://www.postgresql.org.br