Re: functions returning records
От | Tom Lane |
---|---|
Тема | Re: functions returning records |
Дата | |
Msg-id | 21587.993682982@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: functions returning records (Jan Wieck <JanWieck@Yahoo.com>) |
Список | pgsql-hackers |
Hannu Krosing <hannu@tm.ee> writes: > Tom Lane wrote: >> It seems fairly ugly to have a pg_class entry for something that >> isn't a table or even a table-like entity. > I dont think that sequence is any more table-like than record. Oh? It's got storage, it's got columns, you can select from it. test71=# create sequence myseq; CREATE test71=# select * from myseq;sequence_name | last_value | increment_by | max_value | min_value | cache_value | log_cnt |is_cycled | is_called ---------------+------------+--------------+------------+-----------+-------------+---------+-----------+-----------myseq | 1 | 1 | 2147483647 | 1 | 1 | 1 | f | f (1 row) Looks pretty table-ish to me. > Also there seems to be more existing creative use of pg_class - what > does relkind='s' record for pg_variable stand for ? Special system relation. Again, there's storage behind it (at least for pg_log, I suppose pg_xactlock is a bit of a cheat... but there doesn't really need to be a pg_class entry for pg_xactlock anyway, and I'm not sure pg_log needs one either). However, this is fairly academic considering the backwards-compatibility downside of changing pg_attribute.attrelid to pg_attribute.atttypid :-( regards, tom lane
В списке pgsql-hackers по дате отправления: