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

From tango ward
Subject Re: Insert UUID GEN 4 Value
Date
Msg-id CAA6wQLLSo5XABS9bs=XODGgG5GQzeFvrEM7jziY3_sb-tv8hEQ@mail.gmail.com
Whole thread Raw
In response to Re: Insert UUID GEN 4 Value  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Insert UUID GEN 4 Value  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-general
On Thu, May 31, 2018 at 12:32 PM, tango ward <tangoward15@gmail.com> wrote:

On Thu, May 31, 2018 at 12:18 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wednesday, May 30, 2018, tango ward <tangoward15@gmail.com> 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.


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(), '', '', '',)
                                                         ''')

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(), '', '', '',)
                                                         ''')


Hi, this is the query that I am trying to run. I'll try your suggestions when I arrived in the office.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Sort is generating rows
Next
From: Ron
Date:
Subject: Re: Insert UUID GEN 4 Value