File: odbc-postgresql.postinst

package info (click to toggle)
psqlodbc 1%3A13.02.0000-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,148 kB
  • sloc: ansic: 51,638; sh: 11,491; cpp: 1,788; makefile: 175; sql: 157; xml: 31
file content (18 lines) | stat: -rw-r--r-- 461 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

set -e

case $1 in
	configure)
		if [ "$2" ] && dpkg --compare-versions "$2" lt "1:09.00.0310-2" && \
			grep -q /usr/lib/odbc/psqlodbc..so /etc/odbcinst.ini ; then
			echo "Updating /etc/odbcinst.ini for multiarch support"
			odbcinst -u -d -n 'PostgreSQL ANSI'
			odbcinst -u -d -n 'PostgreSQL Unicode'
		fi
		if ! grep -q PostgreSQL /etc/odbcinst.ini ; then
			odbcinst -i -d -f /usr/share/psqlodbc/odbcinst.ini.template
		fi ;;
esac

#DEBHELPER#