mmustafasenoglu opened a new pull request, #2469:
URL: https://github.com/apache/age/pull/2469
## Summary
Closes #2449
Both load_labels_from_file and load_edges_from_file relied on PostgreSQL
COPY's default comma delimiter, causing silent data corruption on labels and
segfault on edges when using non-comma-delimited files.
This adds an optional delimiter TEXT parameter (default comma) to both
functions, allowing users to specify the field separator.
## Changes
- create_copy_options() in both ag_load_labels.c and ag_load_edges.c now
accepts and passes the delimiter to COPY
- SQL function signatures updated with new delimiter parameter (default
comma)
- Regression tests added for pipe-delimited vertex and edge files
## Usage
-- Pipe-delimited vertex file
SELECT load_labels_from_file('graph', 'Label', 'file.csv', true, false,
'|');
-- Pipe-delimited edge file
SELECT load_edges_from_file('graph', 'Edge', 'file.csv', false, '|');
## Backward Compatibility
The new parameter has a default value of comma, so all existing calls
continue to work without changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]