Open philpep opened 1 year ago
I'm afraid we never added support for that form of GENERATED
. The only thing I find is GENERATED AS IDENTITY
in 811329f5 (2017-11-16). The GENERATED ... STORED
syntax was added for PG 12 (2019-10-3). It seems the first thing to do is to retrieve pg_attribute.attgenerated
in the query in dbobject/column.py
and then take it from there (not only for dbtoyaml but also for yamltodb).
This requires
Hi,
Seems having a generated column make
dbtoyaml
crash due to a self reference ofTable
independs_on
:Simple test case to reproduce the bug:
Tested with Pyrseas 0.10.0 and current master branch.
I was quite hard to dig into this because the traceback isn't very useful. The bug is caused by a self reference of the
Table
object throughdepends_on
which is added by_build_dependency_graph()
, I guess this is where the issue should be fixed, addingif src != tgt
before adding independs_on
fixes the bug.In
to_map()
we usecopy.deepcopy()
which seems to not handle well the self reference and we get a unexpected object which lead to this weird traceback.Thanks!