Hi, Another try to get a reply for this dbi-link problem... I was trying to look into the dbi_link.sql code and try to figure out the problem This is from the dbi_link.sql code CREATE OR REPLACE FUNCTION dbi_link.add_dbi_connection_environment( in_data_source_id BIGINT, in_settings YAML ) RETURNS VOID LANGUAGE plperlU AS $$ my ($data_source_id, $settings_yaml) = @_; return unless (defined $settings_yaml); my $settings = Load($settings_yaml); warn Dump($settings) if $_SHARED{debug}; die "In dbi_link.add_dbi_connection_environment, settings is a >@{[ ref($settings) ]}<, not an array reference" unless (ref($settings) eq 'ARRAY'); my $count = 0; foreach my $setting (@$settings) { die "In dbi_link.add_dbi_connection_environment, setting $count is not even a hash reference" unless (ref($setting) eq 'HASH'); die "In dbi_link.add_dbi_connection_environment, setting $count does have the proper components" unless ( exists $setting->{env_name} && exists $setting->{env_value} && exists $setting->{env_action} ); die "In dbi_link.add_dbi_connection_environment, setting $count does have the proper right-hand sides" if ( ref($setting->{env_name}) || ref($setting->{env_value}) || ref($setting->{env_action}) ); foreach my $setting (qw(env_name env_value env_action)) { if (defined $setting->{$setting}) { $setting->{$setting} = $_SHARED{quote_literal}->( $setting->{$setting} ); } else { $setting->{$setting} = 'NULL'; } } my $sql = <<SQL; INSERT INTO dbi_link.dbi_connection_environment ( data_source_id, env_name, env_value, env_action ) VALUES ( $data_source_id, $settings->{env_name}, $settings->{env_value}, $settings->{env_action} ) SQL warn "In dbi_link.add_dbi_connection_environment, executing:\n$sql"; my $rv = spi_exec_query($sql); if ($rv->{status} ne 'SPI_OK_INSERT') { die "In dbi_link.add_dbi_connection_environment, could not insert into dbi_link.dbi_connection_environment: $rv->{status}"; } } return; $$; Here it is trying to insert rows into dbi_link.dbi_connection_environment table INSERT INTO dbi_link.dbi_connection_environment ( data_source_id, env_name, env_value, env_action ) VALUES ( $data_source_id, $settings->{env_name}, $settings->{env_value}, $settings->{env_action} ) SQL When I execute this sql, it runs fine and gives no errors. But if I query this table =# select * from dbi_link.dbi_connection_environment; data_source_id | env_name | env_value | env_action ----------------+----------+-----------+------------ (0 rows) it returns no rows... Why is this table NULL ? If anyone is using dbi-link and has some solution pls reply Thanks Sharmila --- On Mon, 2/9/09, SHARMILA JOTHIRAJAH <sharmi_jo@xxxxxxxxx> wrote: From: SHARMILA JOTHIRAJAH <sharmi_jo@xxxxxxxxx> |