Bug 278372

Summary: Dependency issues making it impossible to install both odbc driver and server of postgresql at the same time. Either works, but not at same time.
Product: Ports & Packages Reporter: stefan <stefan>
Component: Individual Port(s)Assignee: Muhammad Moinur Rahman <bofh>
Status: Closed Works As Intended    
Severity: Affects Many People CC: bofh, girgen, lwhsu, pgsql, stefan
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description stefan 2024-04-14 23:15:58 UTC
Dependency issue, Impossible to install both postgresql odbc driver and server on the same system.

Installed packages to be REMOVED:
        postgresql16-client: 16.2
        postgresql16-server: 16.2

New packages to be INSTALLED:
        postgresql-odbc: 16.00.0000
        postgresql15-client: 15.6
Comment 1 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2024-04-15 05:06:58 UTC
Are you building your ports or are you using the official pkg?

The official pkg cluster only builds pkgs based on the DEFAULT_VERSIONS. So if you need to use postgresql-odbc with any other version other than the default(Currently 15) you will have to build it yourself.

I will look into the possibility of flavors but not sure whether if that will be a good idea.
Comment 2 stefan 2024-04-15 07:34:31 UTC
(In reply to Muhammad Moinur Rahman from comment #1)

This is official pkg. 
Whats confusing for me is that postgresql-odbc is at version 16.00 and it does not match the server/client versions. Making it somewhat difficult to pair them up.
Comment 3 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2024-04-15 07:39:24 UTC
Yes indeed that is a bit confusing. But what happens is version 16 means that it is also compatible with all previous supported versions but not a later version. But the version does not restrict to which client version it is linked to while  building.

However as the current DEFAULT is 15 you have to build the port locally with:
DEFAULT_VERSIONS= pgsql=16

in your make.conf

You can use ports or use poudriere to build and utilize it with pg 16.
Comment 4 Palle Girgensohn freebsd_committer freebsd_triage 2024-04-15 07:43:37 UTC
At present, sadly, you need to use the "default" version of postgresql when using packages. PostgreSQL defaults to 15.

If you use another version, you need to install your dependant packages by building the ports.

There are efforts to use flavours and split the postgresql port up, especailly break out libpq, that would allow using packages for any version of the server, but it requires time and effort that has not yet fully materialized.

Best regards,
Palle