Re: COPY commands could use an enhancement.
От | Bruce Momjian |
---|---|
Тема | Re: COPY commands could use an enhancement. |
Дата | |
Msg-id | 200104301725.f3UHPWs20913@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: COPY commands could use an enhancement. (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
> Alfred Perlstein <bright@wintelcom.net> writes: > > It would be very helpful if the COPY command could be expanded > > in order to provide positional parameters. > > I think it's a bad idea to try to expand COPY into a full-tilt data > import/conversion utility, which is the direction that this sort of > suggestion is headed in. COPY is designed as a simple, fast, reliable, > low-overhead data transfer mechanism for backup and restore. The more > warts we add to it, the less well it will serve that purpose. What is really cool is Informix's UNLOAD/LOAD commands. It combines COPY with SELECT/INSERT: UNLOAD TO '/tmp/x'SELECT * FROM tab and LOAD is similar: LOAD FROM '/tmp/x'INSERT INTO TAB This leverages SELECT and INSERT's column and WHERE capabilities to do almost anything you want with flat files. I think it is superior to our COPY. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: