| From: | Hannu Krosing <hannu(at)trust(dot)ee> | 
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org> | 
| Subject: | A few questions (was: SQL-Query 2 get primary key) | 
| Date: | 1999-02-20 16:09:44 | 
| Message-ID: | 36CEDE48.A54096C7@trust.ee | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
"D'Arcy J.M. Cain" wrote:
> 
> Can someone suggest a
> SELECT statement the would return something like this for this table?
> 
> relname|attname
> -------+-------
> y      |id1,id2
Fist:
 I have been wanting to write aggregate functions SET() and MULTISET()
 that produce an array of base type like SUM() produces  a single value.
But AFAIK the C function interface is not capable of returning it ?
I hope I have misread something.
 BTW is there any possibility do define (in system tables) a function 
 that returns an array of its argument type ?
 I know that currently COUNT() is defined to return int and take any 
 type, but it would be terribly nice to have a mechanism that makes 
 the above possible.
> Or even this.
> 
> relname|attname
> -------+-------
> y      |id1
> y      |id2
> 
> Of course, best would be a new command to give this list.  Perhaps it can
> be added to the pg_indexes table.  Heck, creation time would be a perfect
> time to store it.
Second:
 Is there a (prefgerrably single) spot where I could place a trigger
that can 
 store the source for a CREATE statement?
 I know that Oracle stores all DDL source (sometimes in one big text
field, 
 sometimes each row in its own record), and uses it in recompiling
stuff.
 As it is not currently the case with PostgreSQL, it would be nice to do
it
 using some existing mechanism.
And finally :
 
 what is the state of ALTER TABLE statements for 
 adding/[dis|en]abling/dropping constraints ?
Will it be in 6.5 ?
Or will the only way to make a column nullable defining a new column ?
------------------------
Hannu
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas G. Lockhart | 1999-02-20 16:17:19 | Re: [HACKERS] Re: [SQL] SQL-Query 2 get primary key | 
| Previous Message | Hannu Krosing | 1999-02-20 12:39:44 | Re: [HACKERS] Re: [SQL] SQL-Query 2 get primary key |