Re: Insert UUID GEN 4 Value - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Insert UUID GEN 4 Value
Date
Msg-id 1527738102.2400.1.camel@cybertec.at
Whole thread Raw
In response to Insert UUID GEN 4 Value  (tango ward <tangoward15@gmail.com>)
Responses Re: Insert UUID GEN 4 Value  (tango ward <tangoward15@gmail.com>)
List pgsql-general
tango ward wrote:
> I would like to know how to properly use uuid_generate_v4 when inserting data into PostgreSQL table.
> 
> When I run the command select * from pg_available_extensions;
> I can see this uuid-ossp          | 1.0             |                   | generate universally unique identifiers
(UUIDs)
> 
> I am trying to find a basic and easy to understand documentation of it on how to use
> when inserting data because I have a column that is a uuid type.

Are you looking for this?

   ALTER TABLE tab ALTER col SET DEFAULT uuid_generate_v1();

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com


pgsql-general by date:

Previous
From: tango ward
Date:
Subject: Insert UUID GEN 4 Value
Next
From: tango ward
Date:
Subject: Re: Insert UUID GEN 4 Value