Re: [HACKERS] contrib - Mailing list pgsql-patches

From Joe Conway
Subject Re: [HACKERS] contrib
Date
Msg-id 00df01c0dcf2$c8e21530$0705a8c0@jecw2k1
Whole thread Raw
Responses Re: Re: [HACKERS] contrib  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
> > 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



Attachment

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Remove columns pg_index.haskeytype and pg_index.indisclustered
Next
From: Justin Clift
Date:
Subject: Re: Re: [HACKERS] contrib