Hello, all,

I'm receiving this error:

ProgrammingError: (ProgrammingError) cannot determine type of empty array

It looks like this is happening because the default value for column in new 
instances of one of my models is being initialized to [] (an empty array, no 
inner type), despite my column being defined like this in the model class:

mycol = Column('mycol',
               ARRAY(Integer),
               server_default=text('ARRAY[]::integer[]'),
               default=array([], type_=Integer),
               nullable=False)

I've tried it with both the "default" and "server_default" kwargs, with only 
the "default" kwarg, and with only the "server_default" kwargs, and it seems 
not to make a difference (and I'm not sure really which combination of 
arguments would be most appropriate here, anyway, but that's not the primary 
reason for my question). The column in the database is defined like this:

mycol          integer array NOT NULL

I would appreciate any kind of help or information anyone could provide to help 
me solve this.

Thanks,
Mike

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to