my @contrib_excludes = (
'commit_ts', 'hstore_plperl',
'hstore_plpython', 'intagg',
+ 'jsonb_plpython',
'ltree_plpython', 'pgcrypto',
'sepgsql', 'brin',
'test_extensions', 'test_pg_dump',
'hstore', 'contrib/hstore');
$hstore_plpython->AddDefine(
'PLPYTHON_LIBNAME="plpython' . $pymajorver . '"');
+ my $jsonb_plpython = AddTransformModule(
+ 'jsonb_plpython' . $pymajorver, 'contrib/jsonb_plpython',
+ 'plpython' . $pymajorver, 'src/pl/plpython');
+ $jsonb_plpython->AddDefine(
+ 'PLPYTHON_LIBNAME="plpython' . $pymajorver . '"');
my $ltree_plpython = AddTransformModule(
'ltree_plpython' . $pymajorver, 'contrib/ltree_plpython',
'plpython' . $pymajorver, 'src/pl/plpython',
my $n_src = shift;
my $pl_proj_name = shift;
my $pl_src = shift;
- my $transform_name = shift;
- my $transform_src = shift;
+ my $type_name = shift;
+ my $type_src = shift;
- my $transform_proj = undef;
- foreach my $proj (@{ $solution->{projects}->{'contrib'} })
+ my $type_proj = undef;
+ if ($type_name)
{
- if ($proj->{name} eq $transform_name)
+ foreach my $proj (@{ $solution->{projects}->{'contrib'} })
{
- $transform_proj = $proj;
- last;
+ if ($proj->{name} eq $type_name)
+ {
+ $type_proj = $proj;
+ last;
+ }
}
+ die "could not find base module $type_name for transform module $n"
+ if (!defined($type_proj));
}
- die "could not find base module $transform_name for transform module $n"
- if (!defined($transform_proj));
my $pl_proj = undef;
foreach my $proj (@{ $solution->{projects}->{'PLs'} })
}
# Add base module dependencies
- $p->AddIncludeDir($transform_src);
- $p->AddIncludeDir($transform_proj->{includes});
- foreach my $trans_lib (@{ $transform_proj->{libraries} })
+ if ($type_proj)
{
- $p->AddLibrary($trans_lib);
+ $p->AddIncludeDir($type_src);
+ $p->AddIncludeDir($type_proj->{includes});
+ foreach my $type_lib (@{ $type_proj->{libraries} })
+ {
+ $p->AddLibrary($type_lib);
+ }
+ $p->AddReference($type_proj);
}
- $p->AddReference($transform_proj);
return $p;
}
# Makefile for more details regarding Python-version specific
# dependencies.
if ( $module eq "hstore_plpython"
+ || $module eq "jsonb_plpython"
|| $module eq "ltree_plpython")
{
die "Python not enabled in configuration"
next if ($module eq "xml2" && !defined($config->{xml}));
next if ($module eq "hstore_plperl" && !defined($config->{perl}));
next if ($module eq "hstore_plpython" && !defined($config->{python}));
+ next if ($module eq "jsonb_plpython" && !defined($config->{python}));
next if ($module eq "ltree_plpython" && !defined($config->{python}));
next if ($module eq "sepgsql");