Is there a formal way of submiting something to the
contrib section of the distribution?

__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Sun, 4 Feb 2001 19:37:25 -0800 (PST)
m w <mttf2000@yahoo.com>
contrib
> 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
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sun, 4 Feb 2001 22:42:10 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: contrib
> > 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
Mon, 14 May 2001 20:54:46 -0700
"Joe Conway" <joe@conway-family.com>
Re: [HACKERS] contrib
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@postgresql.org

Tue, 15 May 2001 13:58:39 +1000
Justin Clift <justin@postgresql.org>
Re: Re: [HACKERS] contrib
"Joe Conway" <joe@conway-family.com> writes:
> 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.

Just out of curiosity, why are these needed for TABLE_PRIVILEGES?

> 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)

One thing to bear in mind is that the existing notion of databases
may need to be rethought when we implement SQL-style schemas (which
I hope will happen for 7.2).  It might be best to refrain from inventing
more functions until we see how the schema work settles out.

I haven't yet heard any serious discussion about how to integrate
the SQL-defined schema concepts with Postgres' traditional concept of
independent databases within an installation.  It's about time to have
that discussion though ...

			regards, tom lane

Tue, 15 May 2001 00:42:51 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: [HACKERS] contrib 
>
> Just out of curiosity, why are these needed for TABLE_PRIVILEGES?
>

Only one is really needed for that purpose, current_dbname. TABLE_PRIVILEGES
defines the field TABLE_CATALOG which should be set to the current database
name. In MSSQL7 you can get the current database using a function called
DB_NAME(). In Oracle, you can get it by querying for NAME from V_$DATABASE.

-- Joe



Mon, 14 May 2001 23:19:01 -0700
"Joe Conway" <joe@conway-family.com>
Re: Re: [HACKERS] contrib 