Re: Insert UUID GEN 4 Value

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: tango ward <tangoward15(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Insert UUID GEN 4 Value
Date: 2018-05-31 14:33:32
Message-ID: 95aa024b-c2be-ca22-5b1e-48871d31df68@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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,
>                                                          secure_id,
>                                                          relationship,
>                                                          tuition_bill,
>                                                          cashier_name,
>
> cashier_phone_number
>                                                          )
>                     VALUES (current_timestamp, current_timestamp,
>                             uuid_generate_v4(), '', '', '',)
>                                                          ''')

I just noticed something, the fields you show above do not match the
description of the table you showed here:

https://www.postgresql.org/message-id/CAA6wQLJr6fjzx%2BZK6N4yiViZYdFuGGkMT27zsp-mR1SjAzbGEg%40mail.gmail.com

CREATE TABLE enrollmentinfo (
id integer NOT NULL,
created timestamp with time zone NOT NULL,
modified timestamp with time zone NOT NULL,
secure_id uuid NOT NULL,
relationship character varying(50) NOT NULL,
tuition_bill character varying(255) NOT NULL
);

So which is correct?

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Achilleas Mantzios 2018-05-31 14:54:50 Re: Login with LDAP authentication takes 5 seconds
Previous Message Adrian Klaver 2018-05-31 14:23:43 Re: Insert UUID GEN 4 Value