Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: Don't use `public` schema as default when creating a foreign schema in FDW (#37045)

Ivan Vasilov8d73e0a85fa5
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/CreateIcebergWrapperSheet.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/CreateIcebergWrapperSheet.tsx
index 745b0b27886..a57546e61f2 100644
--- a/apps/studio/components/interfaces/Integrations/Wrappers/CreateIcebergWrapperSheet.tsx
+++ b/apps/studio/components/interfaces/Integrations/Wrappers/CreateIcebergWrapperSheet.tsx
@@ -103,7 +103,7 @@ export const CreateIcebergWrapperSheet = ({
wrapper_name: '',
server_name: '',
source_schema: wrapperMeta.sourceSchemaOption?.defaultValue ?? '',
- target_schema: 'public',
+ target_schema: '',
...Object.fromEntries(
wrapperMeta.server.options.map((option) => [option.name, option.defaultValue ?? ''])
),
@@ -287,6 +287,9 @@ export const CreateIcebergWrapperSheet = ({
onSelectSchema={(schema) => setFieldValue('target_schema', schema)}
onSelectCreateSchema={() => setCreateSchemaSheetOpen(true)}
/>
+ <p className="text-foreground-lighter text-sm">
+ Be careful not to use an API exposed schema.
+ </p>
</div>
</FormSectionContent>
</FormSection>
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx
index a8901afa481..881db37bb74 100644
--- a/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx
+++ b/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx
@@ -88,7 +88,7 @@ export const CreateWrapperSheet = ({
wrapper_name: '',
server_name: '',
source_schema: wrapperMeta.sourceSchemaOption?.defaultValue ?? '',
- target_schema: 'public',
+ target_schema: '',
...Object.fromEntries(
wrapperMeta.server.options.map((option) => [option.name, option.defaultValue ?? ''])
),
@@ -381,6 +381,9 @@ export const CreateWrapperSheet = ({
onSelectSchema={(schema) => setFieldValue('target_schema', schema)}
onSelectCreateSchema={() => setCreateSchemaSheetOpen(true)}
/>
+ <p className="text-foreground-lighter text-sm">
+ Be careful not to use an API exposed schema.
+ </p>
</div>
</FormSectionContent>
</FormSection>