From: JITEN KUMAR SHAH <jitenshah78@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Sub:column "" is of type bigint but expression is of type character varying
Date: Wed, 17 Aug 2022 17:57:02 +0530
Message-ID: <d6894447-5535-1f5a-0ad4-9153de0cea45@GMAIL.COM> (raw)
In-Reply-To: <CAJWX+ENJ-Z6Unwru0PR+WBvi4eJjYJay9GPyeCNvXxSBe5Rkmw@mail.gmail.com>
References: <CAJWX+ENJ-Z6Unwru0PR+WBvi4eJjYJay9GPyeCNvXxSBe5Rkmw@mail.gmail.com>
1. Please check you tickets_archive.ticket_purchase_no data type.
2. check if you are using correct schema.
On 8/17/22 14:23, Rama Krishnan wrote:
> 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
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: jitenshah78@gmail.com
Subject: Re: Sub:column "" is of type bigint but expression is of type character varying
In-Reply-To: <d6894447-5535-1f5a-0ad4-9153de0cea45@GMAIL.COM>
References: <CAJWX+ENJ-Z6Unwru0PR+WBvi4eJjYJay9GPyeCNvXxSBe5Rkmw@mail.gmail.com> <d6894447-5535-1f5a-0ad4-9153de0cea45@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