[Dbix-class] find_or_create problem with Pg: proposed patch

Alex Povolotsky tarkhil at over.ru
Sat Apr 5 09:51:39 BST 2008


Jess Robinson wrote:
>
>
> On Thu, 3 Apr 2008, Alex Povolotsky wrote:
>
>> Hello!
>>
>> Attempt to insert into postgres table with undef's for columns with 
>> default values yields an error. It is especially bad with 
>> find_or_create sub.
>
> Are those columns also nullable, or not? If they're not, inserting 
> null/undef doesn't make sense.. In DBIx::Class or plain SQL. the 
> solution is generally to insert \'DEFAULT' ..

Well, how do you pass DEFAULT (not 'DEFAULT' string, but DEFAULT SQL 
keyword) to DBI?

Alex.




More information about the DBIx-Class mailing list