> It would be gr8 if single column subselects would allow themselves to be treated the same way as lists do as right-side arguments of IN operator.
> This would allow e.g. much more powerful DELETE statement, like
> DELETE FROM table WHERE id IN (SELECT ...)
This, AFAIK, works. I am using just that construct in UPDATE -- I would
assume DELETE would work...
Lessee...This works, as I just tested it on a client's database (inside
a transaction, with a rollback at the end, of course). You say
DELETE from users WHERE uid IN (SELECT uid FROM users WHERE username ~*
to delete (of course, I know that that is a contrived example, but a
More complex is
DELETE from personal_data WHERE uid IN (SELECT uid FROM users WHERE
username ~* 'testing')
-- which works just fine on a client's database (again, inside a
transaction so I could easily roll back the delete :-)).
WGCR Internet Radio
1 Peter 4:11
In response to
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2000-09-29 04:11:33|
|Subject: Re: Subselects lack functionality |
|Previous:||From: pgsql-bugs||Date: 2000-09-28 22:01:38|
|Subject: Subselects lack functionality|