what's the default on the column? seems like that's the problem here. if this
is an in-SQLAlchemy default, that won't work, you need to generate the uuids on
the database side if you are using a SELECT. The functions are available
through an extension on PG, there's background here:
Also, I should mention the ID is not explicitly mentioned in the select
query. I am relying on the column's "default" argument to supply the UUID.
Also also, I made a typo. It should read "when the select only finds one
row".
On Wednesday, June 12, 2019 at 12:36:50 PM UTC-7, Colton Allen
I'm using Postgres and I am getting a duplicate primary key error when
attempting to insert from a query. My primary key is a UUID type.
statement = insert(my_table).from_select(['a', 'b'], select([sometable.c.a,
sometable.c.b])
session.execute(statement)
session.commit()
Error: "DETAIL:
On Wed, Jun 12, 2019, at 10:10 AM, Javier MartÃnez wrote:
> Hi everyone,
> I am searching but I find no solution for my issue that is why I decided to
> ask here. Thanks in advance for your attention.
>
> The issue is related to the update of a second level hierarchy object Id. I
> am
Hi everyone,
I am searching but I find no solution for my issue that is why I decided to
ask here. Thanks in advance for your attention.
The issue is related to the update of a second level hierarchy object Id. I
am creating a hierarchy, following the recommendations in the tutorials but
I