Skip to content

Commit

Permalink
1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ibarwick committed Nov 9, 2018
1 parent 791c6e0 commit 2f90bf2
Show file tree
Hide file tree
Showing 14 changed files with 137 additions and 13 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
Revision history for firebird_fdw

0.6.0 2018-10-??
1.0.0 2018-11-09
- Support Firebird BOOLEAN datatype (Firebird 3.0 and later)
- Improve "IMPORT FOREIGN SCHEMA" implementation
- Avoid segfault if not all expected Firebird connection parameters
were supplied
- Add table option "estimated_row_count"
- Improve handling of foreign tables defined as Firebird queries
- Support PostgreSQL 11
- Adapt code to compile against current PostgreSQL HEAD
- Avoid segfault if not all expected Firebird connection parameters
were supplied

0.5.0 2018-10-12
- Support triggers on foreign tables (PostgreSQL 9.4 and later)
Expand Down
2 changes: 1 addition & 1 deletion META.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "firebird_fdw",
"abstract": "A PostgreSQL foreign data wrapper (FDW) for Firebird",
"version": "0.5.0",
"version": "1.0.0",
"release_status": "stable",
"maintainer": "Ian Barwick <[email protected]>",
"license": {
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ DATA = sql/firebird_fdw--0.3.0.sql \
sql/firebird_fdw--0.3.0--0.4.0.sql \
sql/firebird_fdw--0.4.0.sql \
sql/firebird_fdw--0.4.0--0.5.0.sql \
sql/firebird_fdw--0.5.0.sql
sql/firebird_fdw--0.5.0.sql \
sql/firebird_fdw--0.5.0--1.0.0.sql \
sql/firebird_fdw--1.0.0.sql

PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
Expand Down
2 changes: 1 addition & 1 deletion firebird_fdw.control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Firebird FDW
comment = 'foreign data wrapper for Firebird'
default_version = '0.5.0'
default_version = '1.0.0'
module_pathname = '$libdir/firebird_fdw'
relocatable = true
6 changes: 5 additions & 1 deletion packaging/redhat/postgresql10-firebird_fdw.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: A PostgreSQL foreign data wrapper (FDW) for Firebird
Name: postgresql10-firebird_fdw
Version: 0.5.0
Version: 1.0.0
Release: 1
Source: firebird_fdw-%{version}.tar.gz
URL: https://github.com/ibarwick/firebird_fdw
Expand Down Expand Up @@ -45,9 +45,13 @@ rm -rf $RPM_BUILD_ROOT
%{pgsql_path}/share/extension/firebird_fdw--0.4.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.4.0--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw.control

%changelog
* Fri Nov 9 2018 Ian Barwick ([email protected])
- 1.0.0 release
* Fri Oct 12 2018 Ian Barwick ([email protected])
- 0.5.0 release
* Tue Oct 2 2018 Ian Barwick ([email protected])
Expand Down
62 changes: 62 additions & 0 deletions packaging/redhat/postgresql11-firebird_fdw.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Summary: A PostgreSQL foreign data wrapper (FDW) for Firebird
Name: postgresql11-firebird_fdw
Version: 1.0.0
Release: 1
Source: firebird_fdw-%{version}.tar.gz
URL: https://github.com/ibarwick/firebird_fdw
License: PostgreSQL
Group: Productivity/Databases/Tools
Packager: Ian Barwick
BuildRequires: postgresql11-devel firebird-devel
BuildRequires: libfq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: postgresql11-server libfq

%define pgsql_path /usr/pgsql-11

%description
This is a foreign data wrapper (FDW) to connect PostgreSQL to Firebird.
It provides both read (SELECT) and write (INSERT/UPDATE/DELETE)
support, WHERE-clause pushdowns, connection caching and Firebird transaction
support.

This code is very much work-in-progress; USE AT YOUR OWN RISK.

%prep
%setup

%build
export PG_CONFIG=%{pgsql_path}/bin/pg_config
PG_CPPFLAGS="-I/usr/include/firebird" USE_PGXS=1 make

%install
rm -rf $RPM_BUILD_ROOT
export PG_CONFIG=%{pgsql_path}/bin/pg_config
USE_PGXS=1 make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%{pgsql_path}/lib/firebird_fdw.so
%{pgsql_path}/share/extension/firebird_fdw--0.3.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.3.0--0.4.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.4.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.4.0--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw.control

%changelog
* Fri Nov 9 2018 Ian Barwick ([email protected])
- 1.0.0 release
* Fri Oct 12 2018 Ian Barwick ([email protected])
- 0.5.0 release
* Tue Oct 2 2018 Ian Barwick ([email protected])
- 0.4.0 release
* Sun Apr 22 2018 Ian Barwick ([email protected])
- 0.3.0 release
* Sun Feb 2 2014 Ian Barwick ([email protected])
- First draft
6 changes: 5 additions & 1 deletion packaging/redhat/postgresql93-firebird_fdw.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: A PostgreSQL foreign data wrapper (FDW) for Firebird
Name: postgresql93-firebird_fdw
Version: 0.5.0
Version: 1.0.0
Release: 1
Source: firebird_fdw-%{version}.tar.gz
URL: https://github.com/ibarwick/firebird_fdw
Expand Down Expand Up @@ -45,9 +45,13 @@ rm -rf $RPM_BUILD_ROOT
%{pgsql_path}/share/extension/firebird_fdw--0.4.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.4.0--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw.control

%changelog
* Fri Nov 9 2018 Ian Barwick ([email protected])
- 1.0.0 release
* Fri Oct 12 2018 Ian Barwick ([email protected])
- 0.5.0 release
* Tue Oct 2 2018 Ian Barwick ([email protected])
Expand Down
6 changes: 5 additions & 1 deletion packaging/redhat/postgresql94-firebird_fdw.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: A PostgreSQL foreign data wrapper (FDW) for Firebird
Name: postgresql94-firebird_fdw
Version: 0.5.0
Version: 1.0.0
Release: 1
Source: firebird_fdw-%{version}.tar.gz
URL: https://github.com/ibarwick/firebird_fdw
Expand Down Expand Up @@ -45,9 +45,13 @@ rm -rf $RPM_BUILD_ROOT
%{pgsql_path}/share/extension/firebird_fdw--0.4.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.4.0--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw.control

%changelog
* Fri Nov 9 2018 Ian Barwick ([email protected])
- 1.0.0 release
* Fri Oct 12 2018 Ian Barwick ([email protected])
- 0.5.0 release
* Tue Oct 2 2018 Ian Barwick ([email protected])
Expand Down
6 changes: 5 additions & 1 deletion packaging/redhat/postgresql95-firebird_fdw.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: A PostgreSQL foreign data wrapper (FDW) for Firebird
Name: postgresql95-firebird_fdw
Version: 0.5.0
Version: 1.0.0
Release: 1
Source: firebird_fdw-%{version}.tar.gz
URL: https://github.com/ibarwick/firebird_fdw
Expand Down Expand Up @@ -45,9 +45,13 @@ rm -rf $RPM_BUILD_ROOT
%{pgsql_path}/share/extension/firebird_fdw--0.4.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.4.0--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw.control

%changelog
* Fri Nov 9 2018 Ian Barwick ([email protected])
- 1.0.0 release
* Fri Oct 12 2018 Ian Barwick ([email protected])
- 0.5.0 release
* Tue Oct 2 2018 Ian Barwick ([email protected])
Expand Down
6 changes: 5 additions & 1 deletion packaging/redhat/postgresql96-firebird_fdw.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: A PostgreSQL foreign data wrapper (FDW) for Firebird
Name: postgresql96-firebird_fdw
Version: 0.5.0
Version: 1.0.0
Release: 1
Source: firebird_fdw-%{version}.tar.gz
URL: https://github.com/ibarwick/firebird_fdw
Expand Down Expand Up @@ -45,9 +45,13 @@ rm -rf $RPM_BUILD_ROOT
%{pgsql_path}/share/extension/firebird_fdw--0.4.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.4.0--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0.sql
%{pgsql_path}/share/extension/firebird_fdw--0.5.0--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw--1.0.0.sql
%{pgsql_path}/share/extension/firebird_fdw.control

%changelog
* Fri Nov 9 2018 Ian Barwick ([email protected])
- 1.0.0 release
* Fri Oct 12 2018 Ian Barwick ([email protected])
- 0.5.0 release
* Tue Oct 2 2018 Ian Barwick ([email protected])
Expand Down
2 changes: 2 additions & 0 deletions sql/firebird_fdw--0.5.0--1.0.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION firebird_fdw" to load this file. \quit
36 changes: 36 additions & 0 deletions sql/firebird_fdw--1.0.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*-------------------------------------------------------------------------
*
* foreign-data wrapper for Firebird
*
* Copyright (c) 2013-2018 Ian Barwick
*
* This software is released under the PostgreSQL Licence
*
* Author: Ian Barwick <[email protected]>
*
* IDENTIFICATION
* firebird_fdw/sql/firebird_fdw--1.0.0.sql
*
*-------------------------------------------------------------------------
*/

-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION firebird_fdw" to load this file. \quit

CREATE FUNCTION firebird_fdw_handler()
RETURNS fdw_handler
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

CREATE FUNCTION firebird_fdw_validator(text[], oid)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

CREATE FOREIGN DATA WRAPPER firebird_fdw
HANDLER firebird_fdw_handler
VALIDATOR firebird_fdw_validator;

CREATE OR REPLACE FUNCTION firebird_fdw_version()
RETURNS pg_catalog.int4 STRICT
AS 'MODULE_PATHNAME' LANGUAGE C;
2 changes: 1 addition & 1 deletion src/firebird_fdw.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include "libfq.h"

#define FIREBIRD_FDW_VERSION 500
#define FIREBIRD_FDW_VERSION 10000

#define FB_FDW_LOGPREFIX "[firebird_fdw] "
#define FB_FDW_LOGPREFIX_LEN strlen(FB_FDW_LOGPREFIX)
Expand Down
2 changes: 1 addition & 1 deletion t/01-extension.pl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#
# TODO: parse the value from "firebird_fdw.control" and check for a match

my $version = '500';
my $version = '10000';

my $res = $pg_db->safe_psql(q|SELECT firebird_fdw_version()|);

Expand Down

0 comments on commit 2f90bf2

Please sign in to comment.