On Sun, Jun 28, 2015 at 1:59 AM, Fabien COELHO coe...@cri.ensmp.fr wrote:
\if_ver_eq 9.2
What do you thinking about it?
Couldn't this kind of thing be done directly with PL/pgSQL?
you can use PL/pgSQL - but there are some limits
* maintenance large plpgsql functions
I agree with
Hi,
On 06/28/2015 09:04 AM, Fabien COELHO wrote:
2. The general difficulty of getting psql var values into a DO
block (currently I use temp tables).
Maybe this means that DO should be extended in some way to allow for
parameters, at least when PL/pgSQL is used?
I agree with this
Hi,
On 06/28/2015 02:21 PM, Pavel Stehule wrote:
2015-06-28 14:12 GMT+02:00 Tomas Vondra
tomas.von...@2ndquadrant.com mailto:tomas.von...@2ndquadrant.com:
This proposal is not against to DO parametrization. It is same like
conditional block in C (#ifdef). There is similarity with C
statements
2015-06-28 14:12 GMT+02:00 Tomas Vondra tomas.von...@2ndquadrant.com:
Hi,
On 06/28/2015 09:04 AM, Fabien COELHO wrote:
2. The general difficulty of getting psql var values into a DO
block (currently I use temp tables).
Maybe this means that DO should be extended in some way to allow
Hi,
On 06/28/2015 08:47 AM, Corey Huinker wrote:
5. I'm actually using psql to connect to redshift, which doesn't have DO
blocks at all.
I don't see this as a reason to add features to psql, unless there are
other compelling reasons for the addition.
--
Tomas Vondra
2015-06-28 14:26 GMT+02:00 Tomas Vondra tomas.von...@2ndquadrant.com:
Hi,
On 06/28/2015 08:01 AM, Pavel Stehule wrote:
you can use PL/pgSQL - but there are some limits
* maintenance large plpgsql functions
* the plpgsql functions or anonymous functions create a transaction
borders -
Hi,
On 06/28/2015 08:01 AM, Pavel Stehule wrote:
you can use PL/pgSQL - but there are some limits
* maintenance large plpgsql functions
* the plpgsql functions or anonymous functions create a transaction
borders - what should not be wanted
But why is that a problem? Generally
\if_ver_eq 9.2
What do you thinking about it?
Couldn't this kind of thing be done directly with PL/pgSQL?
you can use PL/pgSQL - but there are some limits
* maintenance large plpgsql functions
I agree with large but that would not necessarily mean complex. Also, some
functions could
2015-06-28 8:59 GMT+02:00 Fabien COELHO coe...@cri.ensmp.fr:
\if_ver_eq 9.2
What do you thinking about it?
Couldn't this kind of thing be done directly with PL/pgSQL?
you can use PL/pgSQL - but there are some limits
* maintenance large plpgsql functions
I agree with large but
I was just musing about this today, and was afraid that no one else would
want it!
This would be useful to me in the following use cases which I have right
now:
1. I have a SQL script that invokes \COPY into a temporary table or some
similar thing, preventing most of my logic from being pushed
2. The general difficulty of getting psql var values into a DO block
(currently I use temp tables).
Maybe this means that DO should be extended in some way to allow for
parameters, at least when PL/pgSQL is used?
--
Fabien.
--
Sent via pgsql-hackers mailing list
2015-06-28 7:49 GMT+02:00 Fabien COELHO coe...@cri.ensmp.fr:
The proposed syntax of new psql commands
\if_ver_eq 9.2
...
\else
\endif
What do you thinking about it?
Couldn't this kind of thing be done directly with PL/pgSQL?
you can use PL/pgSQL - but there are some limits
*
Hello again Pavel,
Note that I'm not against cpp-like features on principle, I did macros for
apache configurations a very long time ago, and that I only give my 0.02€
on this, for what's the € is worth these days:-)
you can use parameters for functions, but you cannot it for DO statement
2015-06-28 8:47 GMT+02:00 Corey Huinker corey.huin...@gmail.com:
I was just musing about this today, and was afraid that no one else would
want it!
This would be useful to me in the following use cases which I have right
now:
1. I have a SQL script that invokes \COPY into a temporary table
Hi,
On 06/28/2015 02:50 PM, Pavel Stehule wrote:
bI don't propose psql scripting./b
I propose simple statement for conditional statement execution. The
core of my proposal are commands
That's a matter of opinion, I guess ...
While you may propose only two simple conditional statements at
On Sunday, June 28, 2015, Pavel Stehule pavel.steh...@gmail.com wrote:
2015-06-28 14:26 GMT+02:00 Tomas Vondra tomas.von...@2ndquadrant.com
javascript:_e(%7B%7D,'cvml','tomas.von...@2ndquadrant.com');:
Hi,
On 06/28/2015 08:01 AM, Pavel Stehule wrote:
you can use PL/pgSQL - but there
2015-06-28 10:46 GMT+02:00 Fabien COELHO coe...@cri.ensmp.fr:
Hello again Pavel,
Note that I'm not against cpp-like features on principle, I did macros for
apache configurations a very long time ago, and that I only give my 0.02€
on this, for what's the € is worth these days:-)
you can
I implemented \foreach five years ago, and this is not simple to
implement statement - so don't propose it. I wouldn't to inject full
scripting language to psql. Then it is better to use bash, perl, python.
But well designed conditional statements needs only few lines for
implementation,
2015-06-28 22:43 GMT+02:00 Corey Huinker corey.huin...@gmail.com:
I implemented \foreach five years ago, and this is not simple to
implement statement - so don't propose it. I wouldn't to inject full
scripting language to psql. Then it is better to use bash, perl, python.
But well designed
Hi
I am thinking about simplifying a deployment some multiversion PostgreSQL
extensions, and scripts.
With current possibilities, we have to use DO statement, what is not
optimal or possible in some use cases. The implementation of condition
block (possible nested) is very simple.
The proposed
The proposed syntax of new psql commands
\if_ver_eq 9.2
...
\else
\endif
What do you thinking about it?
Couldn't this kind of thing be done directly with PL/pgSQL?
--
Fabien.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
21 matches
Mail list logo