head	1.4;
access;
symbols
	REL7_4_29:1.1
	REL8_0_25:1.1
	REL8_1_21:1.1
	REL7_4_28:1.1
	REL8_0_24:1.1
	REL8_1_20:1.1
	REL7_4_27:1.1
	REL8_0_23:1.1
	REL8_1_19:1.1
	REL7_4_26:1.1
	REL8_0_22:1.1
	REL8_1_18:1.1
	REL7_4_25:1.1
	REL8_0_21:1.1
	REL8_1_17:1.1
	REL7_4_24:1.1
	REL8_0_20:1.1
	REL8_1_16:1.1
	REL7_4_23:1.1
	REL8_0_19:1.1
	REL8_1_15:1.1
	REL7_4_22:1.1
	REL8_0_18:1.1
	REL8_1_14:1.1
	REL7_4_21:1.1
	REL8_0_17:1.1
	REL8_1_13:1.1
	REL7_4_20:1.1
	REL8_0_16:1.1
	REL8_1_12:1.1
	REL7_3_21:1.1
	REL7_4_19:1.1
	REL8_0_15:1.1
	REL8_1_11:1.1
	REL7_3_20:1.1
	REL7_4_18:1.1
	REL8_0_14:1.1
	REL8_1_10:1.1
	REL7_3_19:1.1
	REL7_4_17:1.1
	REL8_0_13:1.1
	REL8_1_9:1.1
	REL8_0_12:1.1
	REL8_1_8:1.1
	REL7_3_18:1.1
	REL7_4_16:1.1
	REL8_0_11:1.1
	REL8_1_7:1.1
	REL8_0_10:1.1
	REL8_1_6:1.1
	REL7_4_15:1.1
	REL7_3_17:1.1
	REL8_1_5:1.1
	REL8_0_9:1.1
	REL7_4_14:1.1
	REL7_3_16:1.1
	REL7_3_15:1.1
	REL7_4_13:1.1
	REL8_0_8:1.1
	REL8_1_4:1.1
	REL7_3_14:1.1
	REL7_4_12:1.1
	REL8_0_7:1.1
	REL8_1_3:1.1
	REL7_3_13:1.1
	REL7_4_11:1.1
	REL8_0_6:1.1
	REL8_1_2:1.1
	REL7_3_12:1.1
	REL7_4_10:1.1
	REL8_0_5:1.1
	REL8_1_1:1.1
	REL8_1_STABLE:1.1.0.16
	REL8_1_0:1.1
	REL8_1_0RC1:1.1
	REL8_1_0BETA4:1.1
	REL8_1_0BETA3:1.1
	REL7_3_11:1.1
	REL7_4_9:1.1
	REL8_0_4:1.1
	REL8_1_0BETA2:1.1
	REL8_1_0BETA1:1.1
	REL7_2_8:1.1
	REL7_3_10:1.1
	REL7_4_8:1.1
	REL8_0_3:1.1
	REL8_0_2:1.1
	REL7_2_7:1.1
	REL7_3_9:1.1
	REL7_4_7:1.1
	REL8_0_1:1.1
	REL8_0_STABLE:1.1.0.14
	REL8_0_0:1.1.0.12
	REL8_0_0RC5:1.1
	REL8_0_0RC4:1.1
	REL8_0_0RC3:1.1
	REL8_0_0RC2:1.1
	REL8_0_0RC1:1.1
	REL8_0_0BETA5:1.1
	REL8_0_0BETA4:1.1
	REL7_4_6:1.1
	REL7_3_8:1.1
	REL7_2_6:1.1
	REL8_0_0BETA3:1.1
	REL8_0_0BETA2:1.1
	REL7_2_5:1.1
	REL7_4_5:1.1
	REL7_3_7:1.1
	REL7_4_4:1.1
	REL8_0_0BETA1:1.1
	REL7_4_3:1.1
	REL7_4_2:1.1
	REL7_3_6:1.1
	REL7_4_1:1.1
	REL7_3_5:1.1
	REL7_4:1.1
	REL7_4_RC2:1.1
	REL7_4_STABLE:1.1.0.10
	REL7_4_RC1:1.1
	REL7_4_BETA5:1.1
	REL7_4_BETA4:1.1
	REL7_4_BETA3:1.1
	REL7_4_BETA2:1.1
	WIN32_DEV:1.1.0.8
	REL7_4_BETA1:1.1
	REL7_3_4:1.1
	REL7_3_2:1.1
	REL7_2_4:1.1
	REL7_3_STABLE:1.1.0.6
	REL7_2_3:1.1
	REL7_2_STABLE:1.1.0.4
	REL7_2:1.1
	REL7_2_RC2:1.1
	REL7_2_RC1:1.1
	REL7_2_BETA5:1.1
	REL7_2_BETA4:1.1
	REL7_2_BETA3:1.1
	REL7_2_BETA2:1.1
	REL7_2_BETA1:1.1
	REL7_1_2:1.1
	REL7_1_STABLE:1.1.0.2
	REL7_1_BETA:1.1
	REL7_1_BETA3:1.1
	REL7_1_BETA2:1.1
	REL7_1:1.1;
locks; strict;
comment	@# @;


1.4
date	2006.09.05.17.20.28;	author tgl;	state dead;
branches;
next	1.3;

1.3
date	2006.03.11.04.38.30;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	2006.02.27.16.09.48;	author petere;	state Exp;
branches;
next	1.1;

1.1
date	2000.08.23.06.02.23;	author thomas;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Remove contrib modules that have been migrated to pgfoundry: adddepend,
dbase, dbmirror, fulltextindex, mac, userlock; or abandoned: mSQL-interface,
tips.
@
text
@#! /bin/sh

# $PostgreSQL: pgsql/contrib/mac/createoui,v 1.3 2006/03/11 04:38:30 momjian Exp $

# Utility to create manufacturer's oui table
# OUI is "Organizationally Unique Identifier" assigned by IEEE.
# There are currently three duplicate listings, so we can not enforce
# uniqueness in the OUI field.
# - thomas 2000-08-21

args=
update=0

while [ $# -gt 0 ]
do
    case "$1" in
    --update)
        update=1
        ;;
    --noupdate)
        update=0
        ;;
    --help)
        echo "Usage: $0 --[no]update dbname"
        exit
        ;;
    *)
        args="$args $1"
        ;;
    esac
    shift
done

psql -e $args <<EOF
-- Table containing OUI portions of MAC address and manufacturer's name
create table macoui (
  addr macaddr not null,
  name text not null
);

-- Create an index to help lookups
create index macoui_idx on macoui (addr);

-- Function to return manufacturer's name given MAC address
create function manuf (macaddr)
	returns text as '
		select name from macoui m where trunc(\$1) = m.addr;
' language SQL;
EOF

if [ $update -gt 0 ]; then
    updateoui $args
fi

exit
@


1.3
log
@Add CVS tag lines to files that were lacking them.
@
text
@d3 1
a3 1
# $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.314 2006/03/07 02:54:23 momjian Exp $
@


1.2
log
@Clean up CREATE FUNCTION syntax usage in contrib and elsewhere, in
particular get rid of single quotes around language names and old WITH ()
construct.
@
text
@d2 3
@


1.1
log
@Create and manage information on MAC address OUIs
 (Organizationally Unique Identifiers).
 This is the manufacturer's code in the MAC address.
@
text
@d45 1
a45 1
' language 'SQL';
@

