Python Forum
PostgreSQL psycopg2.errors.DuplicateColumn: column specified more than once
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PostgreSQL psycopg2.errors.DuplicateColumn: column specified more than once
#1
I am creating dynamically table in PostgreSQL using psycopg2 by passing the below 2 strings as column names:

'BAF7_X_X_During_soaking-__Temperature__difference_coil_to_coil_with_metal_temp_TC_load_in_PA_load'

and

'BAF7_X_X_During_soaking-__Temperature__difference_coil_to_coil_with_metal_temp_TC_load__in_TA_load'

And the above column names are not same ( both are different columns )

but i am getting errors as
Error:
Traceback (most recent call last): File "C:/Users/Administrator/PycharmProjects/untitled/table_creation_with_HDA_Data.py", line 131, in <module> cursor.execute(sqlCreateTable) psycopg2.errors.DuplicateColumn: column "BAF7_X_X_During_soaking-__Temperature__difference_coil_to_coil_" specified more than once
Thanks
Rajnish Vishwakarma
Reply
#2
You haven't shown the code.
Reply
#3
In PostgreSQL the maximum length of an identifier is 63 bytes.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Connect to PostgreSQL Through Jump Server and SSH Tunnel using Python? nishans 1 963 Jan-02-2024, 10:37 AM
Last Post: khanzain
  How psycopg2 autocommit works ? johntay 3 10,484 Oct-08-2021, 11:22 AM
Last Post: Larz60+
  Psycopg2 doesn't work with python2 MedianykEugene 3 2,943 Aug-10-2021, 07:00 AM
Last Post: ndc85430
  maintain a postgresql database using osm2pgsql apollo 1 2,299 Aug-03-2020, 10:33 PM
Last Post: Larz60+
  StopIteration exception when mock PostgreSQL connection in several tests igor87z 1 2,908 Jun-10-2020, 06:16 PM
Last Post: ibreeden
  tornado psycopg2 Nikosznb 1 2,313 Feb-23-2020, 10:49 PM
Last Post: scidam
  Frequency and timing of psycopg2 commits acecase 0 2,077 Nov-01-2019, 05:50 PM
Last Post: acecase
  Python and Postgresql syntax select statement Nesreenmhd 1 4,980 Sep-07-2019, 06:08 PM
Last Post: ndc85430
  Create table with psycopg2 on postgreSQL DB yhecohen 2 3,318 Aug-23-2019, 05:56 AM
Last Post: massimo_m
  psycopg2 insert error Wonder_women 0 2,664 Jun-10-2019, 11:56 AM
Last Post: Wonder_women

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020