Re: Add \i option to bring in the specified file as a quoted literal

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Piotr Marcinczyk <pmarcinc(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add \i option to bring in the specified file as a quoted literal
Date: 2013-10-23 05:01:39
Message-ID: CAA4eK1J6374maQefLFr1ZkUrT8ZAE7sOqO=FMbfjjXf_L5XZWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 22, 2013 at 3:04 AM, Piotr Marcinczyk <pmarcinc(at)gmail(dot)com> wrote:
> Hi,
>
> I would like to implement item from TODO marked as easy: "Add \i option
> to bring in the specified file as a quoted literal". I understand intent
> of this item, to be able to have parts of query written in separate
> files (now it is impossible, because \i tries to execute content of file
> as a separate command by function process_file).

For the usecase discussed in the mail chain of that TODO item, Robert
Haas has provided an alternative to achieve it, please check below
link:
http://www.postgresql.org/message-id/AANLkTi=7C8xFYF7uQW0y+si8oNdKoY2NX8jc4bU0GWvY@mail.gmail.com

If you think that alternative is not sufficient for the use case, then
adding new option/syntax is worth, otherwise it might be a shortcut or
other form of some existing way which can be useful depending on how
frequently users use this syntax.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Weimer 2013-10-23 06:55:13 Re: Why the asprintf patch is still breaking the buildfarm
Previous Message Amit Kapila 2013-10-23 04:14:09 Re: Compression of full-page-writes