"Daniel Caune" <[EMAIL PROTECTED]> writes:
> Is there a way to define a function as a procedure, I mean a function
> that returns nothing.
In recent versions you can say RETURNS VOID, which is a bit of a hack
but it gets the point across...
regards, tom lane
-
Hi,
Is there a way to define a function as a procedure, I
mean a function that returns nothing.
CREATE OR REPLACE FUNCTION foo()
AS $$
BEGIN
END;
$$ LANGUAGE 'plpgsql';
Actually, PostgreSQL complains as a “function
result type must be specified”. I can patch my function
andrew wrote:
> How will the query planner do for a nesting query? Treat the
> subqueries as multiple queries and then link them together?
> where can I find the information (codes or documents)?
Look at the execution plan using the EXPLAIN command.
--
Peter Eisentraut
http://developer.postgresq
On Thu, Jan 26, 2006 at 01:51:27PM +0100, Markus Schaber wrote:
> Hmm, are you shure that this is correct? The delete will always delete 0
> rows.
Quite, and no it won't. The contrived example is actually a
simplification of a case one of our developers implemented. The
conflict is on the update
On 1/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> If I want my database to go faster, due to X then I would think that the
> issue is about performance. I wasn't aware of a paticular constraint on X.
>
> I have more that a rudementary understanding of what's going on here, I was
> just hop
On Thu, 26 Jan 2006, Markus Schaber wrote:
> AFAIK, in PostgreSQL normal SQL commands cannot create deadlocks at all,
> the only way to introduce deadlocks is to issue LOCK commands to take
> locks manually. And for this rare case, PostgreSQL contains a deadlock
> detection routine that will abo
How will the query planner do for a nesting query? Treat the
subqueries as multiple queries and then link them together?
where can I find the information (codes or documents)?
Thanks.
On 1/26/06, Peter Eisentraut <[EMAIL PROTECTED]> wrote:
> andrew wrote:
> > But the function foo() would produce di
Hi, Andrew,
Andrew Sullivan wrote:
>>AFAIK, in PostgreSQL normal SQL commands cannot create deadlocks at all,
>>the only way to introduce deadlocks is to issue LOCK commands to take
>>locks manually. And for this rare case, PostgreSQL contains a deadlock
>>detection routine that will abort one of
Richard Huxton schrieb:
> Now (upper_time - lower_time) is the interval you want and summing them
> will give you your answer.
>
> Any help?
Yes, thanks.
But, i remember a little function that i wrote in the past:
http://a-kretschmer.de/tools/time_intersect.sql
And now i have a solution (i h
A. Kretschmer wrote:
Hi,
I have a table like this:
test=# select * from status_log ;
id | status |t_start | t_end
+++
1 | 1 | 2006-01-20 23:00:00+01 | 2006-01-21 06:00:00+01
1 | 1 | 2006-01-21 06:
Hi,
I have a table like this:
test=# select * from status_log ;
id | status |t_start | t_end
+++
1 | 1 | 2006-01-20 23:00:00+01 | 2006-01-21 06:00:00+01
1 | 1 | 2006-01-21 06:00:00+01 | 2006-01-21 2
On Thu, Jan 26, 2006 at 10:42:54AM +0100, Markus Schaber wrote:
> AFAIK, in PostgreSQL normal SQL commands cannot create deadlocks at all,
> the only way to introduce deadlocks is to issue LOCK commands to take
> locks manually. And for this rare case, PostgreSQL contains a deadlock
> detection ro
andrew wrote:
> But the function foo() would produce different values for the two
> queries, so the result will be different.
> A simple example is foo() computes the sum of all the integer fields
> of the input record.
OK, I see now where you're getting at. You want to combine the record
type o
But the function foo() would produce different values for the two
queries, so the result will be different.
A simple example is foo() computes the sum of all the integer fields
of the input record.
On 1/26/06, Peter Eisentraut <[EMAIL PROTECTED]> wrote:
> andrew wrote:
> > Sorry for the confusion.
andrew wrote:
> Sorry for the confusion. This is what i meant. Thanks, Michael.
>
> select *
> from (select * from A, B where A.a = B.b) as s
> where foo(s) < 2;
>
> On 1/25/06, Peter Eisentraut <[EMAIL PROTECTED]> wrote:
> > andrew wrote:
> > > I want to use a UDF to filter tuples t that are gener
Hi, Mario,
My explanation is a little longer, as I think I must at least basically
explain some of the fundamentals of database synchronization.
Mario Splivalo wrote:
>>>Is it possible to change the transaction level within the procedure?
>>No, currently not, the PostgreSQL "stored procedures" r
Hi, Mario,
Mario Splivalo wrote:
>>you need to set the transaction level after the begin and before every
>>other statement... after the begin you have a select that invoke your
>>function so that set is not the first statement...
>
> But I can't do that inside of a function, right?
Right, as y
17 matches
Mail list logo