Re: create foreign table

From: vignesh kumar <vigneshkumar(dot)venugopal(at)outlook(dot)com>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Sam Stearns <sam(dot)stearns(at)dat(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: create foreign table
Date: 2024-10-15 16:00:26
Message-ID: MN0PR20MB49129D639A74585E7D8E3C6187452@MN0PR20MB4912.namprd20.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

First you need to create foreign server, foreign data wrapper then followed by granting access to use the postgres_fdw.. then try accessing it.. that's the optimal way.. I'm not getting what is being tried here

Sent from Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Sent: Monday, October 14, 2024 11:48:26 PM
To: Sam Stearns <sam(dot)stearns(at)dat(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: create foreign table

Hi,

Le lun. 14 oct. 2024 à 20:14, Sam Stearns <sam(dot)stearns(at)dat(dot)com<mailto:sam(dot)stearns(at)dat(dot)com>> a écrit :
Howdy,

Receiving an error without much detail when creating a foreign table:

2024-10-14 11:08:30.928 PDT [1177724] ERROR: conflicting or redundant options
2024-10-14 11:08:30.928 PDT [1177724] STATEMENT: CREATE FOREIGN TABLE ext_invalids (
validcargo char(8),
validauto char(8),
cllocid char(8),
insdid char(6),
memberid char(14),
attachdate char(12),
commonauthority char(1),
contractauthority char(1),
compname char(60),
docket_num char(9)
) SERVER external_dat_dir OPTIONS(filename 'DISABLED', format 'csv', delimiter ',', program '');

I'm not seeing much out there on the error. I'm also not seeing what are valid values for the OPTIONS keyword in the Postgres documentation.

Would someone be able to give advice here, please?

Saying which FDW you're using would help, but I guess it's file_fdw.

You can't specify both filename and program. You have to choose one of them.

Regards.

--
Guillaume.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message vignesh kumar 2024-10-15 16:01:38 Re: Loading data from one table to another
Previous Message vignesh kumar 2024-10-15 15:58:41 Re: Postgres DR using ACM