Hello
I started work on proposed check statement option and there are a few questions?
what is sense of this statement for others PL? When we solve a mainly
PL/pgSQL issue, has sense to implement new statement? Isn't a some
problem in our CREATE FUNCTION design? A separation to two steps
should
Pavel Stehule pavel.steh...@gmail.com writes:
I started work on proposed check statement option and there are a few
questions?
what is sense of this statement for others PL?
IMO you should design this as a call to the PL's validator function.
It's not necessary to make other PLs do anything
CHECK FUNCTION function_name(arglist);
I proposed a stored procedure check_function(name, arglist), but
CHECK FUNCTION is ok for me too. Is easy implement it. Maybe there is
issue - CHECK will be a keyword :(
CHECK is reserved keyword now, so this is issue.
sorry for noise
Pavel
Tom Lane t...@sss.pgh.pa.us writes:
I'm not that happy with overloading the ANALYZE keyword to mean this
(especially not since there is already meaning attached to the syntax
ANALYZE x(y)). But we could certainly use some other name --- I'm
inclined to suggest CHECK:
CHECK FUNCTION
Purpose
Better test coverage of functions. On first call of a function, all sql
statements will be prepared, even those not directly called. Think:
create function test() returns void as $$
begin
if false then
select badcolumn from badtable;
end if;
end; $$ language plpgsql;
Andy Colson a...@squeakycode.net writes:
[ Andy's dubious about adding plpgsql syntax to control this feature ]
Yeah, that bothers me a lot too.
One option I'd thought about, was to extended ANALYZE to support functions.
That's actually quite a good idea, not least because the extra checking
On Sun, Sep 11, 2011 at 01:21, Tom Lane t...@sss.pgh.pa.us wrote:
I'm not that happy with overloading the ANALYZE keyword to mean this
But we could certainly use some other name --- I'm
inclined to suggest CHECK:
CHECK FUNCTION function_name(arglist);
Just a thought:
Marti Raudsepp ma...@juffo.org writes:
On Sun, Sep 11, 2011 at 01:21, Tom Lane t...@sss.pgh.pa.us wrote:
I'm not that happy with overloading the ANALYZE keyword to mean this
But we could certainly use some other name --- I'm
inclined to suggest CHECK:
CHECK FUNCTION
Hello
thank you very much for review
Will always throw an error because at prepare time, the temp junk table wont
exist. This patch implements new syntax to disable the check:
create function test5() returns integer as $$
#prepare_plans on_demand
begin
...
Was it Tom Lane that said, if
Hello
2011/9/11 Tom Lane t...@sss.pgh.pa.us:
Andy Colson a...@squeakycode.net writes:
[ Andy's dubious about adding plpgsql syntax to control this feature ]
Yeah, that bothers me a lot too.
I like to discussion about syntax - a name prepare_plans and
following list is just one (for me -
Pavel Stehule pavel.steh...@gmail.com writes:
I like to discussion about syntax - a name prepare_plans and
following list is just one (for me - practical) shot. I am sure so
preparing all plans on function start is one functionality what we
want - because it can to do early warnings when some
Hi Pavel,
I can get:
ERROR: permission denied to set parameter plpgsql.prepare_plans
with this script:
set plpgsql.prepare_plans to on_start;
create or replace function test1(a integer) returns integer as $$
begin
return a+1;
end;
$$ language plpgsql;
If test1() exists, then this script
Pavel, this patch:
https://commitfest.postgresql.org/action/patch_view?id=624
It applied clean and compiled ok, but I cannot get it to work at all.
$ psql
Timing is on.
psql (9.2devel)
Type help for help.
andy=# set plpgsql.prepare_plans to on_start;
ERROR: unrecognized configuration
On 09/05/2011 05:03 PM, Andy Colson wrote:
Pavel, this patch:
https://commitfest.postgresql.org/action/patch_view?id=624
It applied clean and compiled ok, but I cannot get it to work at all.
$ psql
Timing is on.
psql (9.2devel)
Type help for help.
andy=# set plpgsql.prepare_plans to
On 09/05/2011 05:04 PM, Andrew Dunstan wrote:
On 09/05/2011 05:03 PM, Andy Colson wrote:
Pavel, this patch:
https://commitfest.postgresql.org/action/patch_view?id=624
It applied clean and compiled ok, but I cannot get it to work at all.
$ psql
Timing is on.
psql (9.2devel)
Type help for
On 09/05/2011 05:27 PM, Andy Colson wrote:
On 09/05/2011 05:04 PM, Andrew Dunstan wrote:
On 09/05/2011 05:03 PM, Andy Colson wrote:
Pavel, this patch:
https://commitfest.postgresql.org/action/patch_view?id=624
It applied clean and compiled ok, but I cannot get it to work at all.
$ psql
16 matches
Mail list logo