Re: proposal: psql \setfileref

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: psql \setfileref
Дата
Msg-id CAFj8pRCbJV4Ymi3-5pDcEbsEc7OxWfqWasp5bhk48U-wu8dUUw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: psql \setfileref  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: psql \setfileref
Re: proposal: psql \setfileref
Список pgsql-hackers
Hi

I am sending a initial implementation of psql content commands. This design is reaction to Tom's objections against psql file ref variables. This design is more cleaner, more explicit and more practical - import can be in one step.

Now supported commands are:

r - read file without any modification
rq - read file, escape as literal and use outer quotes
rb - read binary file - transform to hex code string
rbq - read binary file, transform to hex code string and use outer quotes

Usage:

create table testt(a xml);
insert into test values( {rq /home/pavel/.local/share/rhythmbox/rhythmdb.xml} );
\set xxx {r /home/pavel/.local/share/rhythmbox/rhythmdb.xml}

This patch is demo of this design - one part is redundant - I'll clean it in next iteration.

Regards

Pavel

Вложения

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

Предыдущее
От: Andreas Karlsson
Дата:
Сообщение: Re: Contains and is contained by operators of inet datatypes
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Tackling JsonPath support