Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
Date: 2006-06-10 23:30:52
Message-ID: 448B562C.2030305@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
>> O.k. so now what I am getting from this thread is, the functions exist
>> now in pg_dump but we want to pull them out of pg_dump and push them
>> into the backend?
>
> That's exactly what I *don't* want to do. If you can think of a
> use-case for these functions outside of pg_dump, feel free to put them
> in the backend, but pg_dump should continue to do things as it does now.

O.k. well my thought was just to implement the functions for the
backend. I wasn't even aware of the pg_dump dependency. They would be
very useful for application developers in general.

So how about this. I can implement them and submit them for hopeful
inclusion and I will let hackers argue about whether or not they need to
also be in pg_dump ;).

If we can go down this route, can we go back to my original post so that
I insure that I develop something that you guys want? Secondly, is this
something that I can do with SQL and SETOF or do you want them in C?

***
I can guess some of these:

pg_get_tabledef() : Would take a table name and return the columns and
associated types

pg_get_acldef(): Would take an object name and return the associated
roles and permissions for the object

pg_get_typedefault(): This one I am unsure about

pg_get_attrdef(): This one I am unsure about

pg_get_domaindef(): Would take the name of a domain constraint and
return the definition

pg_get_functionef(): Would take the name of a function and return its
soure. However, a function can have the same name with different
arguments, so I am a little unsure?

So could I get some further definition?
***

Sincerely,

Joshua D. Drake

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-06-10 23:33:54 Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
Previous Message Tom Lane 2006-06-10 23:22:59 Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),