Chaining inserts ... This would be cool

Поиск
Список
Период
Сортировка
От Nick Apperson
Тема Chaining inserts ... This would be cool
Дата
Msg-id CAMnfHvuLTA55vM7V3hBLeTkQk5uR0tkZ0903=BxpSHxpQCqyqQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Chaining inserts ... This would be cool
Re: Chaining inserts ... This would be cool
Список pgsql-general
There are obviously workarounds for this, but I'm wondering why the following query shouldn't work. It seems like it should. With MVCC already present on the back-end, I can't see any reason other than additional parsing routines that this couldn't work:

INSERT INTO old_login_id_to_new_account_id(new_account_id, old_login_id) INSERT INTO accounts(id, username, password_hash, email) SELECT DEFAULT, username, password_hash, email FROM logins_old RETURNING id, logins_old.id;

Anyway, I'm sure there are more important features for Postgres (like upserts, unique indexes on GIN, Gist and hash, fixed arrays, compact storage of enum arrays as bitfields, etc.) I just thought it was an interesting idea.

В списке pgsql-general по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] Namespace of array of user defined types is confused by the parser in insert?
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Chaining inserts ... This would be cool