On Friday, May 17, 2019 at 3:57:39 PM UTC-7, Dave S wrote:
>
> As mentioned in another thread, I recently moved one of my tables from
> sqlite to postgres. Importing data all went well. For a while, inserts
> went well, also. But then I started getting ERROR 23505 (dup key). Can I
> blame this on pg8000? [I have an open question on getting hooked up to
> psycopg2]
> [...]
>
Any ideas of what I screwed up?
>
Okay, stuckoverflux led me to the SELECT setval() answer. My BP reading
should now be back in range.
Note 1: the sequence is a separate thing in postgres ('updreq_y_id_seq' in
this case).
Note 2: ALTER SEQUENCE ... RESTART WITH ... is also possible, but doesn't
allow a SELECT subquery to provide the values.
/dps
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/79e43d54-bc42-4807-9a24-3f13da5455f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.