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

2008-04-05 Thread Alex Povolotsky
Jonathan Rockway wrote: * On Sat, Apr 05 2008, Alex Povolotsky wrote: Jess Robinson wrote: { mycol => \'DEFAULT' } perl with use strict should complaint on this. Without use strict - complaint as well. Uh... no. Whooops... hmm... I'll see if DBI will get it and rewri

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

2008-04-05 Thread Jonathan Rockway
* On Sat, Apr 05 2008, Alex Povolotsky wrote: > Jess Robinson wrote: >> { mycol => \'DEFAULT' } > > perl with use strict should complaint on this. Without use strict - > complaint as well. Uh... no. Regards, Jonathan Rockway -- print just => another => perl => hacker => if $,=$" _

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

2008-04-05 Thread Alex Povolotsky
Jess Robinson wrote: Well, how do you pass DEFAULT (not 'DEFAULT' string, but DEFAULT SQL keyword) to DBI? Using a literal string like that: { mycol => \'DEFAULT' } perl with use strict should complaint on this. Without use strict - complaint as well. Alex.

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

2008-04-05 Thread Jess Robinson
On Sat, 5 Apr 2008, Alex Povolotsky wrote: 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 n

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

2008-04-05 Thread Alex Povolotsky
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 nul

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

2008-04-04 Thread Alex Povolotsky
Nigel Metheringham wrote: On 3 Apr 2008, at 16:30, Alex Povolotsky wrote: 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. I've made and tested a simple patch, it looks working ok. So the prob

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

2008-04-03 Thread Alex Povolotsky
Nigel Metheringham wrote: On 3 Apr 2008, at 16:30, Alex Povolotsky wrote: 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. I've made and tested a simple patch, it looks working ok. So the prob

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

2008-04-03 Thread Alex Povolotsky
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 nul

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

2008-04-03 Thread Jess Robinson
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 se

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

2008-04-03 Thread Nigel Metheringham
On 3 Apr 2008, at 16:30, Alex Povolotsky wrote: 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. I've made and tested a simple patch, it looks working ok. So the problem is that when you *exp

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

2008-04-03 Thread Alex Povolotsky
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. I've made and tested a simple patch, it looks working ok. --- DBIx/Class/Storage/DBI/Pg.pm.orig 2007-08-12 01:07:58.0 +0400 +++ D