Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fOYak-0000ae-Lw for pgsql-general@arkaria.postgresql.org; Fri, 01 Jun 2018 01:10:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fOYai-0000yu-Tk for pgsql-general@arkaria.postgresql.org; Fri, 01 Jun 2018 01:10:52 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fOYai-0000yl-82 for pgsql-general@lists.postgresql.org; Fri, 01 Jun 2018 01:10:52 +0000 Received: from mail-oi0-x244.google.com ([2607:f8b0:4003:c06::244]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fOYad-0004nv-VA for pgsql-general@lists.postgresql.org; Fri, 01 Jun 2018 01:10:50 +0000 Received: by mail-oi0-x244.google.com with SMTP id 14-v6so13139344oie.3 for ; Thu, 31 May 2018 18:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=bOf7q6lt87W/mspO8oWBh2ngg5ua//kWPeS5BzhAmPM=; b=ahoa1lDho8JJPevDHdoqzZh1zVHCBOpVdVc2++ffdYI48WglXeeSZd4eViWps0+SOa 6HgMIfq0AMUds+vg4pRxgHNjGzE7Np5OfbsRHIQ/HQBrMsAAnHzn4ZT5ALVCdlW1oc9F M2AOoiGUdmnHivYP6TntpV+eFihYoXKhH7ZRHTsDcnQa3FgCcBVk8r7Qlp1a64CuUvlC Z8gLE+rLG4u4arWNg4fLniFP+2Ul4oC5CNWL8nlRd2U2u9L6nCB0hndIZ/Y91kcPttm8 xZcxsYM4k9308XOeV9Y+bGg0ch3Cs28oHGYD6mQ3VZDLfw82quPKcjoKb25DTofO28U0 mOng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=bOf7q6lt87W/mspO8oWBh2ngg5ua//kWPeS5BzhAmPM=; b=UHT5ubcHiJ9ukCBBufjSFXW+8itCzZRpog35yMzy1VDus8A2eeA8Z6rSfHkUU6jynU SWw0ELgOG8ASDM2QSGHwcGs6QSUuUyIFKdHBZnQxZFVZL3KOz7bgcV+OJKr9Wcz8ZD/x wjyydJO6ubdY5zGUnNs6CAn0hOW8SKChBYHSxQd2rJA7bVj4O3M/qgTzkKTF7UxkI8ZZ Cni54wCMsDNMCTua6z+7BjJ5cGCD5V+783AsEflYjH/O4SCkO2oO5EAj3LbI3dBZ97aJ qqGsPw3PDCsNqLkChIJi7mIp85DneFG3XrH614Ad5okFPUeRfmXylt+nYzKqLlQ6ao9q Gk4A== X-Gm-Message-State: APt69E00cBn7OJ+jV7nlw+U0ePDfCi3DQJ/f1lH2Gca3kXehjGgTE9xa JpW6NqacQJDYWjzKGCvarCwWow== X-Google-Smtp-Source: ADUXVKK3NIEgKnTHhif42GhVN4ChJtVKfqEGWxvoD4i1a+KTN7Gv9Ki8hNHeVqkLaH3OXWkM324DDw== X-Received: by 2002:aca:e4d1:: with SMTP id b200-v6mr4859900oih.242.1527815446516; Thu, 31 May 2018 18:10:46 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id q23-v6sm11667866otd.25.2018.05.31.18.10.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 May 2018 18:10:45 -0700 (PDT) Subject: Re: Insert UUID GEN 4 Value To: pgsql-general@lists.postgresql.org References: <1527738102.2400.1.camel@cybertec.at> <1527738710.2400.4.camel@cybertec.at> From: Ron Message-ID: <6d19c679-3116-2ceb-513e-77728504b37e@gmail.com> Date: Thu, 31 May 2018 20:10:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------B147888EAD611BA74880B30C" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------B147888EAD611BA74880B30C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 > > 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" 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. --------------B147888EAD611BA74880B30C Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 05/31/2018 07:39 PM, tango ward wrote:
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.

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.
--------------B147888EAD611BA74880B30C--