Re: Subselects lack functionality
От | Lamar Owen |
---|---|
Тема | Re: Subselects lack functionality |
Дата | |
Msg-id | 39D3C444.B7BFEF66@wgcr.org обсуждение исходный текст |
Ответ на | Subselects lack functionality (pgsql-bugs@postgresql.org) |
Список | pgsql-bugs |
pgsql-bugs@postgresql.org wrote: > 2. > It would be gr8 if single column subselects would allow themselves to be treated the same way as lists do as right-sidearguments 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 something like DELETE from users WHERE uid IN (SELECT uid FROM users WHERE username ~* 'testing') to delete (of course, I know that that is a contrived example, but a working one). 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 :-)). -- Lamar Owen WGCR Internet Radio 1 Peter 4:11
В списке pgsql-bugs по дате отправления: