pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Insert UUID GEN 4 Value
Date: Thu, 31 May 2018 20:10:42 -0500
Message-ID: <6d19c679-3116-2ceb-513e-77728504b37e@gmail.com> (raw)
In-Reply-To: <CAA6wQLLSo5XABS9bs=XODGgG5GQzeFvrEM7jziY3_sb-tv8hEQ@mail.gmail.com>
References: <CAA6wQLK1MLj6gL9wQYLNZD541_xJjbv9X5EzVADOtMhQnifc9w@mail.gmail.com>
	<1527738102.2400.1.camel@cybertec.at>
	<CAA6wQLJr6fjzx+ZK6N4yiViZYdFuGGkMT27zsp-mR1SjAzbGEg@mail.gmail.com>
	<1527738710.2400.4.camel@cybertec.at>
	<CAA6wQLLwGQC=szWF46ye+yh6dhuAUtgkwNhM6K5UmUc0M3B97Q@mail.gmail.com>
	<CAA6wQLJ_tpazkwPOuO6yuqaVYaqDK0c1ZPkdp7vQtY0h6xm15Q@mail.gmail.com>
	<CAKFQuwbgbiiviWeu+Y1Ri=YryosdHX5+Ja25XTWHV7V_1P+ymQ@mail.gmail.com>
	<CAA6wQLLVpjtxAhPy3K1f63WtvqjK4QrzBLKjeh0PDUOyCvbT2Q@mail.gmail.com>
	<CAKFQuwYf=4-9HEt8uteMMCVLuZ59xkCpWwGQU480Q9FzgtRrQw@mail.gmail.com>
	<CAA6wQLLSo5XABS9bs=XODGgG5GQzeFvrEM7jziY3_sb-tv8hEQ@mail.gmail.com>

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

Honestly, I'd try it in psql first.  That will eliminate all possible 
problems due to quoting errors, etc.

-- 
Angular momentum makes the world go 'round.

view thread (21+ messages)

Message-ID: <6d19c679-3116-2ceb-513e-77728504b37e@gmail.com>
Permalink:  ../6d19c679-3116-2ceb-513e-77728504b37e@gmail.com/
Also on:    postgresql.org/message-id/6d19c679-3116-2ceb-513e-77728504b37e@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: Insert UUID GEN 4 Value
  In-Reply-To: <6d19c679-3116-2ceb-513e-77728504b37e@gmail.com>
  References: <CAA6wQLK1MLj6gL9wQYLNZD541_xJjbv9X5EzVADOtMhQnifc9w@mail.gmail.com> <1527738102.2400.1.camel@cybertec.at> <CAA6wQLJr6fjzx+ZK6N4yiViZYdFuGGkMT27zsp-mR1SjAzbGEg@mail.gmail.com> <1527738710.2400.4.camel@cybertec.at> <CAA6wQLLwGQC=szWF46ye+yh6dhuAUtgkwNhM6K5UmUc0M3B97Q@mail.gmail.com> <CAA6wQLJ_tpazkwPOuO6yuqaVYaqDK0c1ZPkdp7vQtY0h6xm15Q@mail.gmail.com> <CAKFQuwbgbiiviWeu+Y1Ri=YryosdHX5+Ja25XTWHV7V_1P+ymQ@mail.gmail.com> <CAA6wQLLVpjtxAhPy3K1f63WtvqjK4QrzBLKjeh0PDUOyCvbT2Q@mail.gmail.com> <CAKFQuwYf=4-9HEt8uteMMCVLuZ59xkCpWwGQU480Q9FzgtRrQw@mail.gmail.com> <CAA6wQLLSo5XABS9bs=XODGgG5GQzeFvrEM7jziY3_sb-tv8hEQ@mail.gmail.com> <6d19c679-3116-2ceb-513e-77728504b37e@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox