From dan@xeon.unixathome.org  Sun Jan 27 11:48:25 2002
Return-Path: <dan@xeon.unixathome.org>
Received: from xeon.unixathome.org (CPE00C0DFB00A2B.cpe.net.cable.rogers.com [24.102.95.54])
	by hub.freebsd.org (Postfix) with ESMTP id 94CD337B416
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 27 Jan 2002 11:48:24 -0800 (PST)
Received: (from dan@localhost)
	by xeon.unixathome.org (8.11.6/8.11.6) id g0RJmMf11703;
	Sun, 27 Jan 2002 14:48:22 -0500 (EST)
	(envelope-from dan)
Message-Id: <200201271948.g0RJmMf11703@xeon.unixathome.org>
Date: Sun, 27 Jan 2002 14:48:22 -0500 (EST)
From: Dan Langille <dan@langille.org>
Reply-To: Dan Langille <dan@langille.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: girgen@partitur.se
Subject: postgresql doesn't use long version of command line options
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34348
>Category:       ports
>Synopsis:       postgresql doesn't use long version of command line options
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 27 11:50:01 PST 2002
>Closed-Date:    Tue Feb 19 02:24:53 PST 2002
>Last-Modified:  Tue Feb 19 02:25:16 PST 2002
>Originator:     Dan Langille
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
The FreeBSD Diary
>Environment:
System: FreeBSD xeon.unixathome.org 4.4-STABLE FreeBSD 4.4-STABLE #2: Thu Sep 20 23:42:24 EDT 2001 root@xeon.unixathome.org:/usr/obj/usr/src/sys/XEON i386

>Description:
	
>How-To-Repeat:

$ pg_dump --clean FreshPorts2TestLists > FreshPorts2TestLists.clean.sql
$ pg_dump FreshPorts2TestLists > FreshPorts2TestLists.sql
$ ls -l FreshPorts2TestLists.clean.sql FreshPorts2TestLists.sql
-rw-r--r-- 1 dan dan 6189700 Jan 27 14:12 FreshPorts2TestLists.clean.sql
-rw-r--r-- 1 dan dan 6189700 Jan 27 14:13 FreshPorts2TestLists.sql
$ diff FreshPorts2TestLists.clean.sql FreshPorts2TestLists.sql
$

Similar results occur with the -a/--data-only switch.
>Fix:

asmodai had this to say:

FreeBSD has no getopt long stuff
we have devel/libgnugetopt for that

src/bin/pg_dump/pg_dump.c contains this:

#ifdef HAVE_GETOPT_LONG
        puts(
        "  -a, --data-only          dump out only the data, not the schema\n"
                 "  -b, --blobs              dump out blob data\n"
           "  -c, --clean              clean (drop) schema prior to create\n"
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: vanilla 
State-Changed-When: Tue Feb 19 02:24:53 PST 2002 
State-Changed-Why:  
Could your try postgresql v7.2, it depends to gnugetopt now. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34348 
>Unformatted:
