Skip site navigation (1) Skip section navigation (2)

Re: pg_dump sort order for functions

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump sort order for functions
Date: 2010-01-12 14:35:29
Message-ID: 1263306929.14170.21.camel@fsopti579.F-Secure.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On mån, 2010-01-11 at 12:54 -0500, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > On mån, 2010-01-11 at 10:44 -0500, Tom Lane wrote:
> >> I think you could probably use the existing tag field; no need for a new
> >> one.
> 
> > Sorry, which tag field are you referring to?
> 
> The one called "tag" in the source code.  It prints out as "Name":
> 
> --
> -- Name: binary_coercible(oid, oid); Type: FUNCTION; Schema: public; Owner: postgres
>          ^^^^^^^^^^^^^^^^^^^^^^^^^^
> --

Um, that tag is the "name", and if you change that, the name in CREATE
FUNCTION also changes.  I was initially thinking in that direction, but
it seems it won't be feasible without significant refactoring.

In the mean time, hacking it into the sort function itself as a special
case works out fine, per attached patch.  One might frown upon such an
exception, but then again, function overloading is an exception to the
one-name-per-object rule all over the place anyway. ;-)

Attachment: pgdump-sort-order.patch
Description: text/x-patch (938 bytes)

In response to

Responses

pgsql-hackers by date

Next:From: Andrew ChernowDate: 2010-01-12 14:36:33
Subject: Re: Typed tables
Previous:From: Tom LaneDate: 2010-01-12 14:25:59
Subject: Re: NOT NULL violation and error-message

Privacy Policy | About PostgreSQL
Copyright © 1996-2013 The PostgreSQL Global Development Group