proposal: plpgsql return execute ...

Started by Pavel Stehulealmost 18 years ago7 messages
#1Pavel Stehule
pavel.stehule@gmail.com

Hello

I thing RETURN QUERY is successful idea. It should be completed with
support of dynamic SQL.

Syntax:

RETURN EXECUTE sqlstring [USING];

This is shortcut for
FOR r IN EXECUTE sqlstring USING LOOP
RETURN NEXT r;
END LOOP;

Regards
Pavel Stehule

#2Neil Conway
neilc@samurai.com
In reply to: Pavel Stehule (#1)
Re: proposal: plpgsql return execute ...

On Wed, 2008-02-27 at 15:24 +0100, Pavel Stehule wrote:

I thing RETURN QUERY is successful idea. It should be completed with
support of dynamic SQL.

Yeah, I can see that being useful.

RETURN EXECUTE sqlstring [USING];

What is the USING clause for?

-Neil

#3Merlin Moncure
mmoncure@gmail.com
In reply to: Neil Conway (#2)
Re: proposal: plpgsql return execute ...

On Wed, Feb 27, 2008 at 1:58 PM, Neil Conway <neilc@samurai.com> wrote:

On Wed, 2008-02-27 at 15:24 +0100, Pavel Stehule wrote:

I thing RETURN QUERY is successful idea. It should be completed with
support of dynamic SQL.

Yeah, I can see that being useful.

RETURN EXECUTE sqlstring [USING];

What is the USING clause for?

parameter binding.

see: http://archives.postgresql.org/pgsql-patches/2006-08/msg00267.php

merlin

#4Pavel Stehule
pavel.stehule@gmail.com
In reply to: Merlin Moncure (#3)
Re: proposal: plpgsql return execute ...

On 27/02/2008, Merlin Moncure <mmoncure@gmail.com> wrote:

On Wed, Feb 27, 2008 at 1:58 PM, Neil Conway <neilc@samurai.com> wrote:

On Wed, 2008-02-27 at 15:24 +0100, Pavel Stehule wrote:

I thing RETURN QUERY is successful idea. It should be completed with
support of dynamic SQL.

Yeah, I can see that being useful.

RETURN EXECUTE sqlstring [USING];

What is the USING clause for?

parameter binding.

see: http://archives.postgresql.org/pgsql-patches/2006-08/msg00267.php

merlin

I sent modernized version
http://archives.postgresql.org/pgsql-patches/2007-10/msg00161.php

Pavel

#5Bruce Momjian
bruce@momjian.us
In reply to: Pavel Stehule (#4)
Re: proposal: plpgsql return execute ...

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------

Pavel Stehule wrote:

On 27/02/2008, Merlin Moncure <mmoncure@gmail.com> wrote:

On Wed, Feb 27, 2008 at 1:58 PM, Neil Conway <neilc@samurai.com> wrote:

On Wed, 2008-02-27 at 15:24 +0100, Pavel Stehule wrote:

I thing RETURN QUERY is successful idea. It should be completed with
support of dynamic SQL.

Yeah, I can see that being useful.

RETURN EXECUTE sqlstring [USING];

What is the USING clause for?

parameter binding.

see: http://archives.postgresql.org/pgsql-patches/2006-08/msg00267.php

merlin

I sent modernized version
http://archives.postgresql.org/pgsql-patches/2007-10/msg00161.php

Pavel

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#6Pavel Stehule
pavel.stehule@gmail.com
In reply to: Bruce Momjian (#5)
Re: proposal: plpgsql return execute ...

Hello

I have to write this patch first. I am waiting for apply EXECUTE USING
patch and others plpgsql patches.

Regards
Pavel Stehule

Show quoted text

On 03/03/2008, Bruce Momjian <bruce@momjian.us> wrote:

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------

Pavel Stehule wrote:

On 27/02/2008, Merlin Moncure <mmoncure@gmail.com> wrote:

On Wed, Feb 27, 2008 at 1:58 PM, Neil Conway <neilc@samurai.com> wrote:

On Wed, 2008-02-27 at 15:24 +0100, Pavel Stehule wrote:

I thing RETURN QUERY is successful idea. It should be completed with
support of dynamic SQL.

Yeah, I can see that being useful.

RETURN EXECUTE sqlstring [USING];

What is the USING clause for?

parameter binding.

see: http://archives.postgresql.org/pgsql-patches/2006-08/msg00267.php

merlin

I sent modernized version
http://archives.postgresql.org/pgsql-patches/2007-10/msg00161.php

Pavel

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#7Bruce Momjian
bruce@momjian.us
In reply to: Pavel Stehule (#6)
Re: proposal: plpgsql return execute ...

Pavel Stehule wrote:

Hello

I have to write this patch first. I am waiting for apply EXECUTE USING
patch and others plpgsql patches.

OK, removed. Thanks.

---------------------------------------------------------------------------

Regards
Pavel Stehule

On 03/03/2008, Bruce Momjian <bruce@momjian.us> wrote:

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------

Pavel Stehule wrote:

On 27/02/2008, Merlin Moncure <mmoncure@gmail.com> wrote:

On Wed, Feb 27, 2008 at 1:58 PM, Neil Conway <neilc@samurai.com> wrote:

On Wed, 2008-02-27 at 15:24 +0100, Pavel Stehule wrote:

I thing RETURN QUERY is successful idea. It should be completed with
support of dynamic SQL.

Yeah, I can see that being useful.

RETURN EXECUTE sqlstring [USING];

What is the USING clause for?

parameter binding.

see: http://archives.postgresql.org/pgsql-patches/2006-08/msg00267.php

merlin

I sent modernized version
http://archives.postgresql.org/pgsql-patches/2007-10/msg00161.php

Pavel

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your Subscription:
http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&amp;extra=pgsql-hackers

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +