UPDATE with SUBSELECT and ORDER BY
-
Hi @ Postgres BUGS...
SITUATION:
I have a Table
id groupid orderby
11 10
21 20
31 30
41 40
52 10
62 20
10 2 30
11 2
Hello!
Tom Lane <[EMAIL PROTECTED]> wrote
>
> Andreas Heiduk <[EMAIL PROTECTED]> writes:
> > If a view which calls a function is LEFT JOINed to a table but not all
> > result rows are matched by some criteria, then the function is called
> > for each row of the view nevertheless.
>
> > Note th
yups now i got it..
thanx a lot
[EMAIL PROTECTED] wrote:
> and a UNIQUE INDEX on columns "groupid,orderby"
>
> now i want to update
>
> UPDATE
> orderby SET orderby = orderby +10
> WHERE groupid = 1;
>
> -> FAILS because of UNIQUE INDEX
This is a Known Issue(tm). (A "gotcha", some would say).
http://archives.postgresql.org
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
| UPDATE
| orderby SET orderby = orderby +10
| WHERE groupid = 1;
| -> FAILS because of UNIQUE INDEX
One workaround is to do it in two steps, assuming that
orderby is > 0 for all rows you are changing:
BEGIN;
UPDATE mytable SET orderby = -orderby W
<[EMAIL PROTECTED]> wrote
>
> Recently I facing one problem, when the connection for postgresql grow
> up
> to 45 or more, when I trigger a statement from WebApp
> this statement will stuck forever.
> I try to kill this transaction and then trigger the same statement
> again
> but it still the s
Hi
Newbie when it comes down to postgre.
OS: Windows XP SP2 Pro Dutch
When I run a DMS (Xinco) that uses postgre (I only use postgre for this), a
service is started. Xinco uses a separate limited Xinco User account.
After starting the service I see several postgre.exe services running of
vario