Thanks for sending this issue and the sql schema, I will look at it ASAP
This should be a warning as it doesn't change web2py behavior.

Regards

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com


On Thu, Oct 7, 2010 at 10:34 AM, jm <[email protected]> wrote:
> hello,
>
> here is the table definition witch lead to the trouble :
>
> CREATE TABLE aqu_gfcategcultureprec
> (
>  idculture integer NOT NULL,
>  idcategorieculture integer NOT NULL,
>  libelle_categorie character varying,
>  code_libre character varying,
>  CONSTRAINT aqu_gfcategcultureprec_pkey PRIMARY KEY (idculture,
> idcategorieculture),
>  CONSTRAINT fk_idculture_reference_tcultures FOREIGN KEY (idculture)
>      REFERENCES tcultures (idculture) MATCH SIMPLE
>      ON UPDATE RESTRICT ON DELETE RESTRICT
> )
> WITH (
>  OIDS=TRUE
> );
>
> thanks
>
> JM
>
> On 7 oct, 13:34, jm <[email protected]> wrote:
>> Traceback (most recent call last):
>>   File "D:\Dev\web2py\scripts\extract_pgsql_models.py", line 282, in
>> <module>
>>     define_db(cnn, db, host, port, user, passwd)
>>   File "D:\Dev\web2py\scripts\extract_pgsql_models.py", line 266, in
>> define_db
>>     define_table(conn, table)
>>   File "D:\Dev\web2py\scripts\extract_pgsql_models.py", line 244, in
>> define_tabl
>> e
>>     fdef = define_field(conn, table, field, pks)
>>   File "D:\Dev\web2py\scripts\extract_pgsql_models.py", line 94, in
>> define_field
>>
>>     ref = references(conn, table, field['column_name'])
>>   File "D:\Dev\web2py\scripts\extract_pgsql_models.py", line 234, in
>> references
>>     str(rows1))
>> RuntimeError: Unsupported referential constraint: [{'update_rule':
>> 'RESTRICT', '
>> ordinal_position': 1, 'table_name': 'aqu_gfcategcultureprec',
>> 'constraint_name':
>>  'fk_idculture_reference_tcultures', 'delete_rule': 'RESTRICT',
>> 'column_name': '
>> idculture'}, {'update_rule': 'RESTRICT', 'ordinal_position': 1,
>> 'table_name': 'a
>> qu_gfcategcultureprec', 'constraint_name':
>> 'fk_idculture_reference_tcultures', '
>> delete_rule': 'RESTRICT', 'column_name': 'idculture'}, {'update_rule':
>> 'RESTRICT
>> ', 'ordinal_position': 1, 'table_name': 'aqu_gfcategcultureprec',
>> 'constraint_na
>> me': 'fk_idculture_reference_tcultures', 'delete_rule': 'RESTRICT',
>> 'column_name
>> ': 'idculture'}, {'update_rule': 'RESTRICT', 'ordinal_position': 1,
>> 'table_name'
>> : 'aqu_gfcategcultureprec', 'constraint_name':
>> 'fk_idculture_reference_tcultures
>> ', 'delete_rule': 'RESTRICT', 'column_name': 'idculture'}]

Reply via email to