Re: Re: Rough idea for supporting "sequencename.nextval" syntax

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: Re: Rough idea for supporting "sequencename.nextval" syntax
Дата
Msg-id 20010817110831.A29141@rice.edu
обсуждение исходный текст
Ответ на Re: Rough idea for supporting "sequencename.nextval" syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Re: Rough idea for supporting "sequencename.nextval" syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Aug 16, 2001 at 10:36:49PM -0400, Tom Lane wrote:
> I said:
> > Suppose that we invent a new datatype "regclass", similar to regproc:
> > it's actually an OID, but it has the additional implication that it is
> > the OID of a pg_class row, and the I/O operations for the type try to
> > accept or print a class name not just a numeric OID.

Tom, would it make sense to use this new type in the system tables where
pg_class oids currently are used, such as pg_attribute.attrelid ? 

Then, one could do:

select attname from pg_attributes where attrelid = 'mytablename';

If the appropriate type conversions where in place. (I just tried this
with pg_aggregate, looking for aggregates that use a particular operator,
and failed, since text(<some regproc>) yields the oid, rather than
the name.)

This would essentially special case the join of two system tables.  Hmm,
sounds like a step down the trail to not needing user visible oids for
system tables, even. 
> This is starting to seem less like a kluge and more like a real
> feature...

Ross


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Dollar in identifiers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: Rough idea for supporting "sequencename.nextval" syntax