Re: Null option and Default value Lost when use CREATE TABLE AS to backup a table.

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: Null option and Default value Lost when use CREATE TABLE AS to backup a table.
Дата
Msg-id eb300c73-9f98-d243-c762-88e47d88c2d6@postgresfriends.org
обсуждение исходный текст
Ответ на Null option and Default value Lost when use CREATE TABLE AS to backup a table.  ("Xiao, Bing (Benny)" <bing.xiao@dxc.com>)
Список pgsql-bugs
On 10/21/21 7:47 AM, Xiao, Bing (Benny) wrote:
>
>   1.  Create back up table.
> 
>                create table contact_bckp as table contacts with data;

This is not the correct way to do this.  Do it this way instead:

BEGIN;
CREATE TABLE contact_bckp (LIKE contacts INCLUDING ALL);
INSERT INTO contact_bckp TABLE contacts;
COMMIT;
-- 
Vik Fearing



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17240: at time zone ... ; wrong result
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: Null option and Default value Lost when use CREATE TABLE AS to backup a table.