Hi all,
Say there are two tables defined as below:
class Topic(Base):
__tablename__ = 'topics'
id = Column(Integer,Sequence('topic_id_seq'), primary_key=True)
*last_posted_at=Column(DateTime,default=func.now())*
created_at=Column(DateTime,default=func.now())
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
Hi,
1. the server_default=... argument just says what default to define for the
column *on creation* --- it has no effect if the table already exists. To
apply the default to an existing table, you need to execute something like:
ALTER TABLE mytbl ALTER COLUMN mycol ADD DEFAULT
Gulli,
Thank you so much for the helpful information. I think that the type_
argument should cause an explicit cast if it's on a default array empty list
value; that very much was my expectation, unfortunately!
I've discovered what appears to be very strange unexpected behavior:
mycol =
it seems like psycopg2 is doing some odd pattern of guessing vs. not here, if
default=[] works and default=array([]) does not, not sure why that would be,
examining the SQL output (if not the PG logs themselves with statement logging
turned on to see what psycopg2 is actually sending) would
On Dec 3, 2013, at 5:40 AM, Chung WONG wch...@gmail.com wrote:
Hi all,
Say there are two tables defined as below:
class Topic(Base):
__tablename__ = 'topics'
id = Column(Integer,Sequence('topic_id_seq'), primary_key=True)
last_posted_at=Column(DateTime,default=func.now())
Thank you so much for this snippet! It helped figure out my connectivity
issues to Microsoft SQL Server.
On Thursday, December 23, 2010 1:42:42 PM UTC-5, Michael Bayer wrote:
On Dec 23, 2010, at 1:31 PM, Pirate Fibonacci wrote:
running on fedora 13. yum installed everything.
got unixodbc