Skip to content

Commit e1e6cfe

Browse files
authored
Merge pull request #6477 from EnterpriseDB/tim/pgfs-path-updates
clarify use of file:// schema
2 parents 0db6853 + c62d441 commit e1e6cfe

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

advocacy_docs/edb-postgres-ai/ai-accelerator/pgfs/functions.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,16 @@ We start with creating a storage location. A storage location is a reference to
1616
select pgfs.create_storage_location('my_storage', 's3://my_bucket','','{}'::JSONB,'{}'::JSONB);
1717
```
1818

19-
The create_strorage_location function takes a name for the storage location and then a URL for the location. The URL should be prefixed with `s3:` for an S3-compatible bucket or `file:` for a local file system.
19+
The create_strorage_location function takes a name for the storage location and then a URL for the location. The URL should be prefixed with `s3:` for a S3-compatible bucket or `file:` for a local file system.
2020

21-
The function also takes an optional `msl_id` parameter, which is not used. The function also takes an `options` parameter and credentials parameter. They are not optional and should be passed as empty JSON objects if not used.
21+
22+
```sql
23+
select pgfs.create_storage_location('my_file_storage', 'file:///tmp/my_path', NULL, '{}'::json, '{}'::json );
24+
```
25+
26+
When using the `file:` schema, an absolute path has to be provided (starting with `/`, e.g. `/tmp/my_path`). So together with the schema indicator `file://` we have three slashes at the beginning of the path.
27+
28+
The function also takes an optional `msl_id` parameter, which is not used. It also requires `options` and `credentials` parameters; if unused, they must be passed as empty JSON objects.
2229

2330
### Creating a storage location with options and credentials
2431

0 commit comments

Comments
 (0)