Re: gset updated patch

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: gset updated patch
Date: 2012-11-19 08:30:49
Message-ID: CAFj8pRAGY7L=bhUF7t38C4QppzcbFUdaMXdOU+xxv1OEz3oFAA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

2012/11/16 Karl O. Pinc <kop(at)meme(dot)com>:
> Hi Pavel,
>
> On 11/16/2012 12:21:11 AM, Pavel Stehule wrote:
>> 2012/11/16 Karl O. Pinc <kop(at)meme(dot)com>:
>
>> > As long as I'm talking crazy talk, why not
>> > abandon psql as a shell language and instead make a
>> > pl/pgsql interpreter with readlne() in front
>> > of it? Solve all these language-related
>> > issues by using an actual programming language. :-)
>
>> I though about it more time, but I don't thinking so this has a
>> sense.
>> Actually we cannot do perfect autocomplete for significantly simpler
>> SQL and there are lot of client side interprets - is not reason for
>> next one. I use psql together bash and it works well. But just very
>> simple task as storing some volatile data for repetitive usage is
>> relative laborious and it is a motivation for this patch. In psql I
>> can simply work with any fields of returned record - what is more
>> terrible work outside psql
>
> You might consider using "do".

it is reason, why I don't thinking about plpgsql on client side. But I
don't understand how it is related to gset ?

I remember, there is one significant limit of DO statement - it cannot
return table - so it cannot substitute psql simple scripts. But I
don't would open this topic now - it is related to real stored
procedures implementation, and it is long time task. So gset allow
some simple tasks solve simply

Regards

Pavel Stehule

>
> http://www.postgresql.org/docs/9.1/static/sql-do.html
>
> If you need to maintain a single connection you can do
> some interesting things with socat to feed a running psql
> in the background.
>
> socat -u UNIX-RECV:/tmp/msock EXEC:psql &
>
> Followed by lots of
>
> echo bar | socat -u STDIN UNIX-SENDTO:/tmp/mysock
>
> \o can be used to send output for pickup, although
> you do need to fuss around with the asynchronous nature
> of things to be sure you're waiting for output.
> I used inotifywait for this. YMMV.
>
> Regards,
>
> Karl <kop(at)meme(dot)com>
> Free Software: "You don't pay back, you pay forward."
> -- Robert A. Heinlein
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2012-11-19 08:40:46 Re: pg_dump --split patch
Previous Message Heikki Linnakangas 2012-11-19 08:20:53 Re: 9.3 pg_archivecleanup broken?