[Dbix-class] Postgresql delimiter problem

Mario Minati Mario.Minati at minati.de
Sun May 26 19:19:11 GMT 2013


Hello,

I've an interesting problem with delimiters with Postgresql:

While preparing a new production server I found that the code, which is run=
ning fine on development server, doesn't work - probably because of Postgre=
sql config problem.
But I cannot remember any more if I have changed any setting while setup of=
 dev server.

The code:
<snip>
#!/usr/bin/env perl

use strict;
use warnings;

use feature ":5.10";

use FindBin;
use lib "$FindBin::Bin/../lib";
use glueDB::Schema;
use Config::JFDI;

my $config       =3D Config::JFDI->new( name =3D> 'glue' );
my $config_hash  =3D $config->get;
my $connect_info =3D $config_hash->{"Model::glueDB"}{"connect_info"};
my $schema       =3D glueDB::Schema->connect($connect_info);

my $debug =3D 0;

$schema->txn_do( sub {
    $schema->resultset('Common::Country')->create({ name =3D> 'TEST' });
});
<snap>

Throws on prod server (with DBIC_TRACE enabled):
BEGIN WORK
INSERT INTO "changeset" ( "set_date") VALUES ( ? ) RETURNING "ID": '2013-05=
-26 19:05:20'
ROLLBACK
DBI Exception: DBD::Pg::st execute failed: ERROR:  column "ID" does not exi=
st
LINE 1: ... INTO "changeset" ( "set_date") VALUES ( $1 ) RETURNING "ID"
                                                                   ^ [for S=
tatement "INSERT INTO "changeset" ( "set_date") VALUES ( ? ) RETURNING "ID"=
" with ParamValues: 1=3D'2013-05-26 19:05:20'] at /usr/local/share/perl/5.1=
4.2/DBIx/Class/Schema.pm line 1080.

The problem is on "ID".

Any ides what switch in postgresql could be the one?


Best greets,

Mario Minati


--
MINATI
Planungsb=FCro f=FCr Haustechnik
D=F6renwaldstra=DFe 6a
D-32760 Detmold
Germany
Tel: +49 / 5231 / 4580-100
Fax: +49 / 5231 / 4580-118
E-Mail: mario.minati at minati.de
WWW: www.minati.de
Ablage:
WV:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20130526/b8f=
98230/attachment.htm


More information about the DBIx-Class mailing list