Sub:column "" is of type bigint but expression is of type character varying

From: Rama Krishnan <raghuldrag(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Sub:column "" is of type bigint but expression is of type character varying
Date: 2022-08-17 08:53:41
Message-ID: CAJWX+ENJ-Z6Unwru0PR+WBvi4eJjYJay9GPyeCNvXxSBe5Rkmw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

I am having table name called tickets

\d tickets

Column | Type | Collation |
Nullable | Default
------------------------------+-----------------------------+-----------+----------+---------
id | bigint |
| not null |
ticket_purchase_no| bigint | |
not null |

this below table contains more than 2 years old data
\d tickets_archive

Column | Type | Collation |
Nullable | Default
------------------------------+-----------------------------+-----------+----------+---------
id | bigint |
| not null |
ticket_purchase_no| bigint | |
not null |

i have purged the old data from orginal table when i am restoring the data
from archive table into orignal table i am getting the error

*insert into tickets select * from tickets_archive;*

column "*ticket_purchase_no*" is of type bigint but expression is of type
character varying
Regards

A.Rama Krishnan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2022-08-17 09:26:34 Re: Can I get the number of results plus the results with a single query?
Previous Message Peter Eisentraut 2022-08-17 05:33:25 Re: Would it be possible to add functions to tab-completion in psql?