Re: Insert UUID GEN 4 Value

2018-05-31 Thread Ron
On 05/31/2018 07:39 PM, tango ward wrote: On Thu, May 31, 2018 at 12:32 PM, tango ward > wrote: On Thu, May 31, 2018 at 12:18 PM, David G. Johnston mailto:david.g.johns...@gmail.com>> wrote: On Wednesday, May 30, 2018, tango ward mailto:tangowar...

Re: Insert UUID GEN 4 Value

2018-05-31 Thread tango ward
On Thu, May 31, 2018 at 12:32 PM, tango ward wrote: > > On Thu, May 31, 2018 at 12:18 PM, David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Wednesday, May 30, 2018, tango ward wrote: >>> >>> Okay I will try it. >>> >>> When I tried it, I am getting an error: Invalid input syn

Re: Insert UUID GEN 4 Value

2018-05-31 Thread David G. Johnston
On Wed, May 30, 2018 at 9:32 PM, tango ward wrote: > > On Thu, May 31, 2018 at 12:18 PM, David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Wednesday, May 30, 2018, tango ward wrote: >>> >>> Okay I will try it. >>> >>> When I tried it, I am getting an error: >>> ​​ >>> Invalid

Re: Insert UUID GEN 4 Value

2018-05-31 Thread Adrian Klaver
On 05/30/2018 09:32 PM, tango ward wrote: I'm testing this code: curr_pgsql.execute('''CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; ''') curr_pgsql.execute('''     INSERT INTO enrollmentinfo ( created, modified,

Re: Insert UUID GEN 4 Value

2018-05-31 Thread Adrian Klaver
On 05/31/2018 06:39 AM, Tom Lane wrote: Adrian Klaver writes: My suspicion is it had to do with this from a post upstream: "When I tried it, I am getting an error: Invalid input syntax for UUID: uuid_generate_v4()," Yeah. We haven't seen the actual query yet, but I'm betting the OP really wr

Re: Insert UUID GEN 4 Value

2018-05-31 Thread Dennis Gearon
Sent from Yahoo Mail on Android On Wed, May 30, 2018 at 8:25 PM, tango ward wrote: Hi, 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  | aq

Re: Insert UUID GEN 4 Value

2018-05-31 Thread Tom Lane
Adrian Klaver writes: > My suspicion is it had to do with this from a post upstream: > "When I tried it, I am getting an error: Invalid input syntax for UUID: > uuid_generate_v4()," Yeah. We haven't seen the actual query yet, but I'm betting the OP really wrote INSERT ... , 'uuid_gener

Re: Insert UUID GEN 4 Value

2018-05-31 Thread Adrian Klaver
On 05/30/2018 09:45 PM, tango ward wrote: On Thu, May 31, 2018 at 12:06 PM, Rob Sargent > wrote: If I try these in psql, CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; SELECT uuid_generate_v4(); I am getting the generated code but I dunno how to use this in INSE

Re: Insert UUID GEN 4 Value

2018-05-31 Thread Adrian Klaver
On 05/31/2018 05:36 AM, C GG wrote: On Thu, May 31, 2018 at 12:45 AM, tango ward > wrote: On Thu, May 31, 2018 at 12:06 PM, Rob Sargent mailto:robjsarg...@gmail.com>> wrote: On May 30, 2018, at 9:57 PM, tango ward mailto:tangowar...@gmail.com>> wrot

Re: Insert UUID GEN 4 Value

2018-05-31 Thread C GG
On Thu, May 31, 2018 at 12:45 AM, tango ward wrote: > On Thu, May 31, 2018 at 12:06 PM, Rob Sargent > wrote: > >> >> >> On May 30, 2018, at 9:57 PM, tango ward wrote: >> >> On Thu, May 31, 2018 at 11:53 AM, tango ward >> wrote: >> >>> On Thu, May 31, 2018 at 11:51 AM, Laurenz Albe >> > wrote:

Re: Insert UUID GEN 4 Value

2018-05-30 Thread tango ward
On Thu, May 31, 2018 at 12:06 PM, Rob Sargent wrote: > > > On May 30, 2018, at 9:57 PM, tango ward wrote: > > On Thu, May 31, 2018 at 11:53 AM, tango ward > wrote: > >> On Thu, May 31, 2018 at 11:51 AM, Laurenz Albe >> wrote: >> >>> tango ward wrote: >>> > I found this: >>> > >>> > CREATE EXTE

Re: Insert UUID GEN 4 Value

2018-05-30 Thread tango ward
On Thu, May 31, 2018 at 12:18 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wednesday, May 30, 2018, tango ward wrote: >> >> Okay I will try it. >>> >> >> When I tried it, I am getting an error: Invalid input syntax for UUID: >> uuid_generate_v4(), >> > > Avoid references to "it

Re: Insert UUID GEN 4 Value

2018-05-30 Thread David G. Johnston
On Wednesday, May 30, 2018, tango ward wrote: > > Okay I will try it. >> > > When I tried it, I am getting an error: Invalid input syntax for UUID: > uuid_generate_v4(), > Avoid references to "it" and just show the code you tried to run. David J.

Re: Insert UUID GEN 4 Value

2018-05-30 Thread Rob Sargent
> On May 30, 2018, at 9:57 PM, tango ward wrote: > >> On Thu, May 31, 2018 at 11:53 AM, tango ward wrote: >>> On Thu, May 31, 2018 at 11:51 AM, Laurenz Albe >>> wrote: >>> tango ward wrote: >>> > I found this: >>> > >>> > CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; >>> > SELECT uuid_genera

Re: Insert UUID GEN 4 Value

2018-05-30 Thread tango ward
On Thu, May 31, 2018 at 11:53 AM, tango ward wrote: > On Thu, May 31, 2018 at 11:51 AM, Laurenz Albe > wrote: > >> tango ward wrote: >> > I found this: >> > >> > CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; >> > SELECT uuid_generate_v4(); >> > >> > My problem is I have a table like this: >> > CRE

Re: Insert UUID GEN 4 Value

2018-05-30 Thread tango ward
On Thu, May 31, 2018 at 11:51 AM, Laurenz Albe wrote: > tango ward wrote: > > I found this: > > > > CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; > > SELECT uuid_generate_v4(); > > > > My problem is I have a table like this: > > CREATE TABLE enrollmentinfo ( > > id integer NOT NULL, > > cre

Re: Insert UUID GEN 4 Value

2018-05-30 Thread Laurenz Albe
tango ward wrote: > I found this: > > CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; > SELECT uuid_generate_v4(); > > My problem is I have a table like this: > CREATE TABLE enrollmentinfo ( > id integer NOT NULL, > created timestamp with time zone NOT NULL, > modified timestamp with tim

Re: Insert UUID GEN 4 Value

2018-05-30 Thread tango ward
On Thu, May 31, 2018 at 11:47 AM, tango ward wrote: > Hi, > > thanks. > > I found this: > > CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; > SELECT uuid_generate_v4(); > > My problem is I have a table like this: > CREATE TABLE enrollmentinfo ( > id integer NOT NULL, > created timestamp with

Re: Insert UUID GEN 4 Value

2018-05-30 Thread tango ward
Hi, thanks. I found this: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; SELECT uuid_generate_v4(); My problem is I have a table like this: CREATE TABLE enrollmentinfo ( id integer NOT NULL, created timestamp with time zone NOT NULL, modified timestamp with time zone NOT NULL, secu

Re: Insert UUID GEN 4 Value

2018-05-30 Thread Laurenz Albe
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 i

Insert UUID GEN 4 Value

2018-05-30 Thread tango ward
Hi, 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 tr