Re: COPY does not work with regproc and aclitem

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: COPY does not work with regproc and aclitem
Дата
Msg-id 20061023201322.GE11409@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: COPY does not work with regproc and aclitem  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Hmm, maybe it should be using regprocedure instead?
> 
> Not unless you want to break initdb.  The only reason regproc still
> exists, really, is to accommodate loading of pg_type during initdb.
> Guess what: we can't do type lookup at that point.

I was thinking in the copied-out table, which not necessarily has to be
pg_aggregate.  I just tried, and it works to do this:

alvherre=# create table pg_aggregate2 (aggfnoid regprocedure, aggtransfn
alvherre(# regprocedure, aggfinalfn regprocedure, aggsortop oid, aggtranstype oid,
alvherre(# agginitval text);
CREATE TABLE
alvherre=# insert into pg_aggregate2 select * from pg_aggregate;
INSERT 0 114
alvherre=# create table test (like pg_aggregate2);
CREATE TABLE
alvherre=# copy pg_aggregate2 to '/tmp/pg_agg.out';
COPY 114
alvherre=# copy test from '/tmp/pg_agg.out';
COPY 114
alvherre=# 

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: COPY does not work with regproc and aclitem
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: COPY does not work with regproc and aclitem