From: | Mark Smith <mark(at)zoneget(dot)com> |
---|---|
To: | Benjamin Acquaye <benjaminacquaye2(at)gmail(dot)com> |
Cc: | "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Changing the Datatype from Bit to Boolean. |
Date: | 2025-02-24 23:54:33 |
Message-ID: | SA3PR18MB53700EAF6CCDFECB2AD2ACC3C8C02@SA3PR18MB5370.namprd18.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi Benjamin
Thanks for your help. The script to upload *.sql worked well.
Mark
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Benjamin Acquaye <benjaminacquaye2(at)gmail(dot)com>
Sent: Sunday, February 23, 2025 9:01:44 AM
To: Mark Smith <mark(at)zoneget(dot)com>
Subject: Re: Changing the Datatype from Bit to Boolean.
Bro, this issue you're encountering with pg_restore could stem from a few different factors,
and some of the common reasons and solutions.
1. Database Format Mismatch
The backup file you're trying to restore might not be in the right format.
PostgreSQL supports several backup formats:
Custom format (.backup): This is often created with pg_dump.
=============
Plain SQL format (.sql): This is a plain text file containing SQL commands.
=================
Directory format: A directory structure, also generated by pg_dump.
=================
Solution:
=========
If you're trying to restore from a .sql file, you should use psql instead of pg_restore.
==========================================================================================
==>psql -U your_user -d your_db_name -f backup.sql
If it's a .backup or directory format, you should use pg_restore. Example:
==========================================================================
==>pg_restore -U your_user -d your_db_name your_backup_file.backup
Solution:
Make sure the user you're logged in as has the appropriate permissions to create objects in the database.
==>GRANT ALL PRIVILEGES ON DATABASE your_db_name TO your_user;
On Sun, Feb 23, 2025 at 9:46 AM Mark Smith <mark(at)zoneget(dot)com<mailto:mark(at)zoneget(dot)com>> wrote:
I am new to PostgreSQL. I am trying to restore a db downloaded from GitHub. Pg_restore is coming with error when tried using pgAdmin. Can you tell what the reason could be?
Thanks for your help.
Mark
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: hellen jiang <hellenjiang99(at)gmail(dot)com<mailto:hellenjiang99(at)gmail(dot)com>>
Sent: Sunday, February 23, 2025 8:13:05 AM
To: Gambhir Singh <gambhir(dot)singh05(at)gmail(dot)com<mailto:gambhir(dot)singh05(at)gmail(dot)com>>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org<mailto:pgsql-admin(at)lists(dot)postgresql(dot)org> <pgsql-admin(at)lists(dot)postgresql(dot)org<mailto:pgsql-admin(at)lists(dot)postgresql(dot)org>>
Subject: Re: Changing the Datatype from Bit to Boolean.
you can add one new column(boolean) and then remove the BIT column。
On Sun, Feb 23, 2025, 12:58 AM Gambhir Singh <gambhir(dot)singh05(at)gmail(dot)com<mailto:gambhir(dot)singh05(at)gmail(dot)com>> wrote:
Hi,
Aurora PostgreSQL DB has a table in which one column has the datatype BIT(1). Now the requirement is that I have to change the datatype of that column from BIT to BOOLEAN. There are only a few rows in the table.
--
Thanks & Regards
Gambhir Singh
From | Date | Subject | |
---|---|---|---|
Next Message | Edwin UY | 2025-02-25 04:47:37 | V12 to V16 Upgrade -- does size matters? |
Previous Message | Ron Johnson | 2025-02-24 23:05:40 | Re: Question about pg_dump + pg_restore + pg_toast |