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

Re: Re: [HACKERS] contrib

From: Justin Clift <justin(at)postgresql(dot)org>
To: Joe Conway <joe(at)conway-family(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Re: [HACKERS] contrib
Date: 2001-05-15 03:58:39
Message-ID: 3B00A96F.1CC03F0C@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Wouldn't this be better as part of PostgreSQL's standard functions,
instead of being in contrib?

Feels like this kind of function is useful "for everyone".

???

:-)

Regards and best wishes,

Justin Clift

Joe Conway wrote:
> 
> > > Is there a formal way of submiting something to the
> > > contrib section of the distribution?
> >
> > Not really.  Just throw it over to patches, and we will check it out.
> >
> >
> > --
> >   Bruce Momjian                        |  http://candle.pha.pa.us
> 
> While thinking about how to implement TABLE_PRIVILEGES view per SQL92, I
> realized that a function is needed to dynamically return the current
> database name, and current database owner. I also remembered that I have
> needed the first function before and could not find anything. Attached is a
> group of 4 functions, suitable (I think) for contrib, as follows:
> 
> current_dbname() - returns name of current database
> current_dboid() - retuns oid of current database
> current_dbownername() - returns owner name of current database (based on
> datdba)
> current_dbownerid() - returns owner usesysid (well, more accurately datdba)
> 
> Installation:
> copy to contrib
> tar -xzvf current_db.tgz
> cd current_db
> ./install.sh (or alternatively make; make install; psql -U postgres
> your_db_name < current_db.sql)
> 
> I'd like to have this considered for inclusion in contrib if deemed useful
> to others. Is there anything specific I need to do to in addition to the
> attached?
> 
> Thanks,
> 
> -- Joe
> 
>   ------------------------------------------------------------------------
>                      Name: current_db.tgz
>    current_db.tgz    Type: application/x-compressed
>                  Encoding: base64
> 
>   ------------------------------------------------------------------------
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to

pgsql-hackers by date

Next:From: Hiroshi InoueDate: 2001-05-15 04:15:02
Subject: Re: error on INSERT - connection is read only
Previous:From: Joe ConwayDate: 2001-05-15 03:54:46
Subject: Re: [HACKERS] contrib

pgsql-patches by date

Next:From: Tom LaneDate: 2001-05-15 04:25:01
Subject: Re: Remove columns pg_index.haskeytype and pg_index.indisclustered
Previous:From: Joe ConwayDate: 2001-05-15 03:54:46
Subject: Re: [HACKERS] contrib

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