Skip to content

Commit

Permalink
Update docs links for PG12 and later featurss (#2175)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyanshi-yb authored Jan 13, 2025
1 parent 0106500 commit 0e1726b
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 97 deletions.
107 changes: 65 additions & 42 deletions migtests/tests/analyze-schema/expected_issues.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"SqlStatement": "CREATE VIEW sales.employ_depart_view AS\n SELECT any_value(name) AS any_employee\n FROM public.employees;"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
},
{
Expand All @@ -109,6 +110,7 @@
"SqlStatement": "CREATE TABLE sales.test_json_chk (\n id integer,\n name text,\n email text,\n active text,\n data jsonb,\n CONSTRAINT test_json_chk_data_check CHECK ((data['key'::text] \u003c\u003e '{}'::jsonb))\n);"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
"MinimumVersionsFixedIn": null
},
{
Expand All @@ -119,6 +121,7 @@
"SqlStatement": "CREATE TABLE sales.json_data (\n id integer NOT NULL,\n array_column text,\n unique_keys_column text,\n CONSTRAINT json_data_array_column_check CHECK ((array_column IS JSON ARRAY)),\n CONSTRAINT json_data_unique_keys_column_check CHECK ((unique_keys_column IS JSON WITH UNIQUE KEYS))\n);"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
}
],
Expand Down Expand Up @@ -235,56 +238,56 @@
{
"ConstructTypeName": "Aggregate Functions",
"Query": "SELECT range_intersect_agg(event_range) AS intersection_of_ranges\nFROM sales.events",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
},
{
"ConstructTypeName": "Aggregate Functions",
"Query": "SELECT range_agg(event_range) AS union_of_ranges\nFROM sales.events",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
},
{
"ConstructTypeName": "Aggregate Functions",
"Query": "SELECT\n any_value(name) AS any_employee\n FROM employees",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
},
{
"ConstructTypeName": "Merge Statement",
"Query": "MERGE INTO sales.customer_account ca\nUSING sales.recent_transactions t \nON t.customer_id = ca.customer_id\nWHEN MATCHED THEN\n UPDATE SET balance = balance + transaction_value\nWHEN NOT MATCHED THEN\n INSERT (customer_id, balance)\n VALUES (t.customer_id, t.transaction_value)",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#merge-command",
"MinimumVersionsFixedIn": null
},
{

"ConstructTypeName": "Jsonb Subscripting",
"Query": "SELECT \n data,\n data[$1] AS name, \n (data[$2]) as active\nFROM sales.test_json_chk",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
"MinimumVersionsFixedIn": null
},
{
"ConstructTypeName": "Jsonb Subscripting",
"Query": "SELECT (sales.get_user_info($1))[$2] AS user_info",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
"MinimumVersionsFixedIn": null
},
{
"ConstructTypeName": "Jsonb Subscripting",
"Query": "SELECT (jsonb_build_object($1, $2, $3, $4, $5, $6) || $7)[$8] AS json_obj",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
"MinimumVersionsFixedIn": null
},
{
"ConstructTypeName": "Jsonb Subscripting",
"Query": "SELECT ($1 :: jsonb)[$2][$3] as b",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
"MinimumVersionsFixedIn": null
},
{
"ConstructTypeName": "Json Type Predicate",
"Query": "SELECT * \nFROM sales.json_data\nWHERE array_column IS JSON ARRAY",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
}
],
Expand All @@ -298,6 +301,7 @@
"SqlStatement": "SELECT\n data,\n data['name'] AS name,\n (data['active']) as active\n FROM sales.test_json_chk;"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
"MinimumVersionsFixedIn": null
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@
"SqlStatement": "CREATE COLLATION schema2.ignore_accents (provider = icu, deterministic = false, locale = 'und-u-kc-ks-level1');"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
},
{
Expand Down Expand Up @@ -659,6 +660,7 @@
"SqlStatement": "CREATE TRIGGER t_raster BEFORE DELETE OR UPDATE ON public.combined_tbl FOR EACH ROW EXECUTE FUNCTION public.lo_manage('raster');"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#large-objects-and-its-functions-are-currently-not-supported",
"MinimumVersionsFixedIn": null
},
{
Expand All @@ -669,6 +671,7 @@
"SqlStatement": "ALTER TABLE ONLY public.test_jsonb\n ADD CONSTRAINT test_jsonb_id_region_fkey FOREIGN KEY (id, region) REFERENCES public.sales_region(id, region);"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
},
{
Expand All @@ -679,6 +682,7 @@
"SqlStatement": "CREATE TABLE public.ordersentry (\n order_id integer NOT NULL,\n customer_name text NOT NULL,\n product_name text NOT NULL,\n quantity integer NOT NULL,\n price numeric(10,2) NOT NULL,\n processed_at timestamp without time zone,\n r integer DEFAULT regexp_count('This is an example. Another example. Example is a common word.'::text, 'example'::text)\n);"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
},
{
Expand All @@ -693,6 +697,7 @@
"SqlStatement": "CREATE VIEW schema2.top_employees_view AS\n SELECT id,\n first_name,\n last_name,\n salary\n FROM ( SELECT employeesforview.id,\n employeesforview.first_name,\n employeesforview.last_name,\n employeesforview.salary\n FROM schema2.employeesforview\n ORDER BY employeesforview.salary DESC\n FETCH FIRST 2 ROWS WITH TIES) top_employees;"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
},
{
Expand All @@ -703,6 +708,7 @@
"SqlStatement": "CREATE VIEW public.view_explicit_security_invoker WITH (security_invoker='true') AS\n SELECT employee_id,\n first_name\n FROM public.employees;"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
},
{
Expand Down Expand Up @@ -741,6 +747,7 @@
"SqlStatement": "ALTER TABLE ONLY schema2.users_unique_nulls_not_distinct\n ADD CONSTRAINT users_unique_nulls_not_distinct_email_key UNIQUE NULLS NOT DISTINCT (email);"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
}
],
Expand Down Expand Up @@ -2861,19 +2868,19 @@
{
"ConstructTypeName": "Large Object Functions",
"Query": "SELECT lo_create($1)",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#large-objects-and-its-functions-are-currently-not-supported",
"MinimumVersionsFixedIn": null
},
{
"ConstructTypeName": "COPY FROM ... WHERE",
"Query": "COPY employeesCopyFromWhere (id, name, age)\nFROM STDIN WITH (FORMAT csv)\nWHERE age \u003e 30",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
},
{
"ConstructTypeName": "COPY ... ON_ERROR",
"Query": "COPY employeesCopyOnError (id, name, age)\nFROM STDIN WITH (FORMAT csv, ON_ERROR IGNORE )",
"DocsLink": "",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
}
],
Expand All @@ -2887,6 +2894,7 @@
"SqlStatement": "SELECT lo_unlink(loid);"
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#large-objects-and-its-functions-are-currently-not-supported",
"MinimumVersionsFixedIn": null
},
{
Expand Down
22 changes: 11 additions & 11 deletions yb-voyager/src/query/queryissue/issues_ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ var loDatatypeIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_1,
Suggestion: "Large objects are not yet supported in YugabyteDB, no workaround available currently",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25318",
DocsLink: "", // TODO
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#large-objects-and-its-functions-are-currently-not-supported", // TODO
}

func NewLODatatypeIssue(objectType string, objectName string, SqlStatement string, colName string) QueryIssue {
Expand All @@ -477,8 +477,8 @@ var multiRangeDatatypeIssue = issue.Issue{
Name: "Unsupported datatype",
Impact: constants.IMPACT_LEVEL_1,
Suggestion: "Multirange data type is not yet supported in YugabyteDB, no workaround available currently",
GH: "", //TODO
DocsLink: "", //TODO
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewMultiRangeDatatypeIssue(objectType string, objectName string, sqlStatement string, typeName string, colName string) QueryIssue {
Expand All @@ -492,8 +492,8 @@ var securityInvokerViewIssue = issue.Issue{
Name: "Security Invoker Views not supported yet",
Impact: constants.IMPACT_LEVEL_1,
Suggestion: "Security Invoker Views are not yet supported in YugabyteDB, no workaround available currently",
GH: "", // TODO
DocsLink: "", // TODO
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewSecurityInvokerViewIssue(objectType string, objectName string, SqlStatement string) QueryIssue {
Expand All @@ -505,8 +505,8 @@ var deterministicOptionCollationIssue = issue.Issue{
Name: DETERMINISTIC_OPTION_WITH_COLLATION_NAME,
Impact: constants.IMPACT_LEVEL_1,
Suggestion: "This feature is not supported in YugabyteDB yet",
GH: "", // TODO
DocsLink: "", // TODO
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewDeterministicOptionCollationIssue(objectType string, objectName string, SqlStatement string) QueryIssue {
Expand All @@ -518,8 +518,8 @@ var foreignKeyReferencesPartitionedTableIssue = issue.Issue{
Name: FOREIGN_KEY_REFERENCES_PARTITIONED_TABLE_NAME,
Impact: constants.IMPACT_LEVEL_1,
Suggestion: "No workaround available ",
GH: "", // TODO
DocsLink: "", // TODO
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewForeignKeyReferencesPartitionedTableIssue(objectType string, objectName string, SqlStatement string, constraintName string) QueryIssue {
Expand All @@ -534,8 +534,8 @@ var uniqueNullsNotDistinctIssue = issue.Issue{
Name: UNIQUE_NULLS_NOT_DISTINCT_NAME,
Impact: constants.IMPACT_LEVEL_1,
Suggestion: "",
GH: "",
DocsLink: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewUniqueNullsNotDistinctIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
Expand Down
48 changes: 24 additions & 24 deletions yb-voyager/src/query/queryissue/issues_dml.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var advisoryLocksIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "",
Suggestion: "",
GH: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/3642",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#advisory-locks-is-not-yet-implemented",
}

Expand All @@ -43,7 +43,7 @@ var systemColumnsIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "",
Suggestion: "",
GH: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/24843",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#system-columns-is-not-yet-supported",
}

Expand All @@ -57,7 +57,7 @@ var xmlFunctionsIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "",
Suggestion: "",
GH: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/1043",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#xml-functions-is-not-yet-supported",
}

Expand All @@ -71,8 +71,8 @@ var regexFunctionsIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "",
Suggestion: "",
GH: "",
DocsLink: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewRegexFunctionsIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
Expand All @@ -85,8 +85,8 @@ var aggregateFunctionIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "any_value, range_agg and range_intersect_agg functions not supported yet in YugabyteDB",
Suggestion: "",
GH: "",
DocsLink: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewAggregationFunctionIssue(objectType string, objectName string, sqlStatement string, funcNames []string) QueryIssue {
Expand All @@ -103,8 +103,8 @@ var jsonConstructorFunctionsIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "Postgresql 17 features not supported yet in YugabyteDB",
Suggestion: "",
GH: "",
DocsLink: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewJsonConstructorFunctionIssue(objectType string, objectName string, sqlStatement string, funcNames []string) QueryIssue {
Expand All @@ -121,8 +121,8 @@ var jsonQueryFunctionIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "Postgresql 17 features not supported yet in YugabyteDB",
Suggestion: "",
GH: "",
DocsLink: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewJsonQueryFunctionIssue(objectType string, objectName string, sqlStatement string, funcNames []string) QueryIssue {
Expand All @@ -140,7 +140,7 @@ var loFunctionsIssue = issue.Issue{
Description: "Large Objects functions are not supported in YugabyteDB",
Suggestion: "Large objects functions are not yet supported in YugabyteDB, no workaround available right now",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25318",
DocsLink: "", //TODO
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#large-objects-and-its-functions-are-currently-not-supported",
}

func NewLOFuntionsIssue(objectType string, objectName string, sqlStatement string, funcNames []string) QueryIssue {
Expand All @@ -157,8 +157,8 @@ var jsonbSubscriptingIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "Jsonb subscripting is not supported in YugabyteDB yet",
Suggestion: "Use Arrow operators (-> / ->>) to access the jsonb fields.",
GH: "",
DocsLink: "", //TODO
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
}

func NewJsonbSubscriptingIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
Expand All @@ -171,8 +171,8 @@ var jsonPredicateIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "IS JSON predicate expressions not supported yet in YugabyteDB",
Suggestion: "",
GH: "",
DocsLink: "", //TODO
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewJsonPredicateIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
Expand All @@ -185,8 +185,8 @@ var copyFromWhereIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "",
Suggestion: "",
GH: "",
DocsLink: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewCopyFromWhereIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
Expand All @@ -199,8 +199,8 @@ var copyOnErrorIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "",
Suggestion: "",
GH: "",
DocsLink: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewCopyOnErrorIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
Expand All @@ -213,8 +213,8 @@ var fetchWithTiesIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "FETCH .. WITH TIES is not supported in YugabyteDB",
Suggestion: "No workaround available right now",
GH: "",
DocsLink: "", //TODO
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}

func NewFetchWithTiesIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
Expand All @@ -227,8 +227,8 @@ var mergeStatementIssue = issue.Issue{
Impact: constants.IMPACT_LEVEL_2,
Description: "This statement is not supported in YugabyteDB yet",
Suggestion: "Use PL/pgSQL to write the logic to get this functionality",
GH: "",
DocsLink: "", //TODO
GH: "https://github.com/yugabyte/yugabyte-db/issues/25574",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#merge-command",
}

func NewMergeStatementIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
Expand Down

0 comments on commit 0e1726b

Please sign in to comment.