我不知道这是什么,我试图运行以下SQL,但是我收到了这个错误:
collation "default.pg_catalog" for encoding "UTF8" does not exist
SQL是:
CREATE TABLE public.account
(
sales_region__c character varying(40) COLLATE "default".pg_catalog,
parent_industry_group__c character varying(1300) COLLATE "default".pg_catalog,
pricing_type__c character varying(50) COLLATE "default".pg_catalog,
accountnumber character varying(40) COLLATE "default".pg_catalog,
vat_registration_number__c character varying(30) COLLATE "default".pg_catalog,
language__c character varying(255) COLLATE "default".pg_catalog,
account_uuid__c character varying(200) COLLATE "default".pg_catalog,
billingstreet character varying(255) COLLATE "default".pg_catalog,
ispartner__c boolean,
address1__c character varying(255) COLLATE "default".pg_catalog,
currencyisocode character varying(3) COLLATE "default".pg_catalog,
company_registration_number__c character varying(30) COLLATE "default".pg_catalog,
parent_industry_mix__c character varying(1300) COLLATE "default".pg_catalog,
lastmodifiedbyid character varying(18) COLLATE "default".pg_catalog,
isservicecenter__c boolean,
county__c character varying(50) COLLATE "default".pg_catalog,
embargo__c boolean,
export_control_status__c character varying(255) COLLATE "default".pg_catalog,
customer_name__c character varying(100) COLLATE "default".pg_catalog,
geocode_status__c character varying(50) COLLATE "default".pg_catalog,
type character varying(40) COLLATE "default".pg_catalog,
ownerid character varying(18) COLLATE "default".pg_catalog,
parentid character varying(18) COLLATE "default".pg_catalog,
industry_group__c character varying(1300) COLLATE "default".pg_catalog,
createdbyid character varying(18) COLLATE "default".pg_catalog,
sv_status__c character varying(30) COLLATE "default".pg_catalog,
industry character varying(40) COLLATE "default".pg_catalog,
address3__c character varying(100) COLLATE "default".pg_catalog,
email__c character varying(80) COLLATE "default".pg_catalog,
var_contact_language__c character varying(1300) COLLATE "default".pg_catalog,
vendor_type__c character varying(255) COLLATE "default".pg_catalog,
account_local_name__c character varying(250) COLLATE "default".pg_catalog,
customer_account_group__c character varying(255) COLLATE "default".pg_catalog,
createddate timestamp without time zone,
supress_renewal_messaging__c boolean,
parent_industry_group_summary__c character varying(1300) COLLATE "default".pg_catalog,
billingstate character varying(80) COLLATE "default".pg_catalog,
parent_industry_segment__c character varying(1300) COLLATE "default".pg_catalog,
mark_for_deletion__c boolean,
state_province__c character varying(255) COLLATE "default".pg_catalog,
auto_assignment__c boolean,
billingcity character varying(40) COLLATE "default".pg_catalog,
group__c character varying(25) COLLATE "default".pg_catalog,
is_partner_certified__c boolean,
notify_language__c character varying(30) COLLATE "default".pg_catalog,
account_csn__c character varying(30) COLLATE "default".pg_catalog NOT NULL,
city__c character varying(50) COLLATE "default".pg_catalog,
industry_segment__c character varying(1300) COLLATE "default".pg_catalog,
issupportcenter__c boolean,
export_control_notes__c character varying(255) COLLATE "default".pg_catalog,
fax character varying(40) COLLATE "default".pg_catalog,
license_compliance__c boolean,
alias__c character varying(100) COLLATE "default".pg_catalog,
renewal_url__c character varying(100) COLLATE "default".pg_catalog,
status__c character varying(255) COLLATE "default".pg_catalog,
partner_type__c character varying(255) COLLATE "default".pg_catalog,
upsellopportunity__c character varying(255) COLLATE "default".pg_catalog,
lastmodifieddate timestamp without time zone,
support_contact__c character varying(18) COLLATE "default".pg_catalog,
phone character varying(40) COLLATE "default".pg_catalog,
gp_account__c character varying(1300) COLLATE "default".pg_catalog,
partner_support_prov_flag__c boolean,
registration_number__c character varying(30) COLLATE "default".pg_catalog,
partner_flag__c boolean,
geo__c character varying(20) COLLATE "default".pg_catalog,
billingcountry character varying(80) COLLATE "default".pg_catalog,
address2__c character varying(100) COLLATE "default".pg_catalog,
parent_account_csn__c character varying(1300) COLLATE "default".pg_catalog,
individual_flag__c boolean,
support_provision_flag__c boolean,
account_type__c character varying(30) COLLATE "default".pg_catalog,
ispartner boolean,
name character varying(255) COLLATE "default".pg_catalog,
billingpostalcode character varying(20) COLLATE "default".pg_catalog,
zip_postal__c character varying(30) COLLATE "default".pg_catalog,
sec_city__c character varying(50) COLLATE "default".pg_catalog,
iscustomerportal boolean,
sub_region__c character varying(40) COLLATE "default".pg_catalog,
isdeleted boolean,
language_code__c character varying(255) COLLATE "default".pg_catalog,
active__c character varying(255) COLLATE "default".pg_catalog,
slaexpirationdate__c date,
primary_partner_program__c character varying(15) COLLATE "default".pg_catalog,
country__c character varying(50) COLLATE "default".pg_catalog,
rfr_email_addr__c character varying(50) COLLATE "default".pg_catalog,
systemmodstamp timestamp without time zone,
pricing_group__c character varying(50) COLLATE "default".pg_catalog,
global_agreement__c character varying(15) COLLATE "default".pg_catalog,
parent_named_account_group__c character varying(1300) COLLATE "default".pg_catalog,
slaserialnumber__c character varying(10) COLLATE "default".pg_catalog,
industry_sub_segment__c character varying(1300) COLLATE "default".pg_catalog,
end_customer_agreement_number__c character varying(100) COLLATE "default".pg_catalog,
parent_sales_org__c character varying(255) COLLATE "default".pg_catalog,
local_language_name__c character varying(100) COLLATE "default".pg_catalog,
CONSTRAINT "PK_account" PRIMARY KEY (account_csn__c)
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.account
OWNER to "SPRUCEPOSTGRESSDB2";
任何想法?
我的最终目标是在Docker容器中复制我们的生产postgresql数据库。也许还有一种更好的方法来手动克隆?
答案 0 :(得分:3)
将"default".pg_catalog
更改为pg_catalog."default"
答案 1 :(得分:0)
如果是大写,请将其改为小写。它为我工作。 更改
COLLATE PG_CATALOG."DEFAULT"
到
collate pg_catalog."default"