Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update age_load to load scalar property values with appropriate type (#1519) (#1525) #1564

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

rafsun42
Copy link
Member

@rafsun42 rafsun42 commented Feb 6, 2024

sql/age_main.sql Show resolved Hide resolved
sql/age_main.sql Show resolved Hide resolved
…pache#1519) (apache#1525)

Previously, property values from csv files were always loaded as strings. This
patch adds a boolean function parameter `load_as_agtype`. When this parameter
is true, values are converted to an appropriate scalar type (i.e. string, bool,
numeric, null) while loading. Otherwise, values are loaded as string. It uses
the agtype_value_from_cstring() function for conversion.

Additional change(s):
-------------------
 - Fix: for csv rows in edge files, create_agtype_from_list_i()'s start_index
   is corrected to 4

Note:
----
 - It applies both patch 1519 and 1525.
The json_validate() function is borrowed from PG16 with minor changes.
Because it does not exist in other versions of PG.
@jrgemignani jrgemignani merged commit a8bd78c into apache:PG15 Feb 7, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PG15 PostgreSQL15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants