From 3a82b2b001e7ab9e8558c90a7d59b3dac9c4b3c2 Mon Sep 17 00:00:00 2001 From: Alex Ball Date: Wed, 2 Mar 2022 19:33:21 -0800 Subject: [PATCH] [docs] restructure releases section (#11621) (With a LOT of broken-link fixes, too) --- docs/config.yaml | 1 - docs/content/latest/_index.html | 10 +- docs/content/latest/admin/_index.md | 2 +- docs/content/latest/admin/yb-admin.md | 2 +- docs/content/latest/admin/yb-ctl.md | 6 +- docs/content/latest/admin/yb-ts-cli.md | 2 +- docs/content/latest/admin/ysql-dump.md | 8 +- docs/content/latest/admin/ysql-dumpall.md | 10 +- docs/content/latest/admin/ysqlsh.md | 28 +- docs/content/latest/api/ycql/_index.md | 26 +- .../latest/api/ycql/ddl_alter_table.md | 6 +- .../latest/api/ycql/ddl_create_table.md | 6 +- .../content/latest/api/ycql/ddl_drop_index.md | 2 +- .../content/latest/api/ycql/ddl_drop_table.md | 6 +- docs/content/latest/api/ycql/dml_delete.md | 20 +- docs/content/latest/api/ycql/dml_insert.md | 18 +- docs/content/latest/api/ycql/dml_select.md | 24 +- .../latest/api/ycql/dml_transaction.md | 8 +- docs/content/latest/api/ycql/dml_truncate.md | 6 +- docs/content/latest/api/ycql/dml_update.md | 20 +- docs/content/latest/api/ycql/explain.md | 8 +- docs/content/latest/api/ycql/expr_fcall.md | 28 +- .../content/latest/api/ycql/expr_subscript.md | 2 +- .../latest/api/ycql/function_datetime.md | 14 +- docs/content/latest/api/ycql/type_datetime.md | 6 +- docs/content/latest/api/ysql/_index.md | 10 +- .../latest/api/ysql/datatypes/_index.md | 18 +- .../type_datetime/conceptual-background.md | 18 +- .../type-interval/declaring-intervals.md | 4 +- .../interval-interval-addition.md | 6 +- .../interval-interval-comparison.md | 4 +- .../interval-number-multiplication.md | 16 +- ...nt-interval-overloads-of-plus-and-minus.md | 16 +- .../interval-representation/_index.md | 4 +- .../internal-representation-model.md | 2 +- .../type-interval/interval-utilities.md | 34 +- .../type-interval/justfy-and-extract-epoch.md | 2 +- .../type_datetime/functions/_index.md | 2 +- .../type_datetime/operators/_index.md | 8 +- .../test-date-time-addition-overloads.md | 10 +- .../test-date-time-comparison-overloads.md | 2 +- .../test-date-time-subtraction-overloads.md | 10 +- .../type_datetime/timezones/recommendation.md | 12 +- .../name-res-rules/rule-4.md | 18 +- .../function-syntax-semantics/_index.md | 2 +- .../invocation-syntax-semantics.md | 6 +- .../api/ysql/the-sql-language/_index.md | 2 +- .../the-sql-language/statements/_index.md | 20 +- .../statements/ddl_create_schema.md | 4 +- .../statements/ddl_create_trigger.md | 6 +- .../statements/ddl_create_view.md | 6 +- .../statements/ddl_drop_table.md | 2 +- .../statements/ddl_drop_trigger.md | 4 +- .../the-sql-language/statements/dml_delete.md | 6 +- .../the-sql-language/statements/dml_insert.md | 6 +- .../the-sql-language/statements/dml_update.md | 4 +- .../statements/perf_explain.md | 4 +- .../the-sql-language/statements/txn_abort.md | 4 +- .../the-sql-language/statements/txn_commit.md | 6 +- .../the-sql-language/statements/txn_end.md | 2 +- .../statements/txn_rollback.md | 2 +- .../latest/architecture/concepts/universe.md | 8 +- .../architecture/concepts/yb-tserver.md | 2 +- .../architecture/query-layer/overview.md | 2 +- .../resilience/jepsen-testing-ycql.md | 4 +- .../resilience/jepsen-testing-ysql.md | 4 +- .../scalability/scaling-queries-ycql.md | 14 +- .../scalability/scaling-queries-ysql.md | 6 +- docs/content/latest/contribute/_index.md | 2 +- docs/content/latest/deploy/checklist.md | 30 +- .../deploy/kubernetes/best-practices.md | 19 +- .../latest/deploy/kubernetes/clients.md | 11 +- .../multi-cluster/gke/helm-chart.md | 5 +- .../deploy/kubernetes/multi-zone/_index.md | 4 - .../kubernetes/multi-zone/eks/helm-chart.md | 4 +- .../kubernetes/multi-zone/gke/helm-chart.md | 4 +- .../kubernetes/single-zone/aks/helm-chart.md | 6 +- .../single-zone/aks/statefulset-yaml.md | 6 +- .../kubernetes/single-zone/eks/helm-chart.md | 2 +- .../kubernetes/single-zone/gke/helm-chart.md | 6 +- .../gke/statefulset-yaml-local-ssd.md | 12 +- .../single-zone/gke/statefulset-yaml.md | 6 +- .../single-zone/oss/operator-hub.md | 3 +- .../single-zone/oss/rook-operator.md | 6 +- .../latest/deploy/manual-deployment/_index.md | 8 +- .../manual-deployment/install-software.md | 2 - .../deploy/manual-deployment/start-masters.md | 10 +- .../manual-deployment/start-tservers.md | 12 +- .../deploy/manual-deployment/system-config.md | 2 - .../manual-deployment/verify-deployment.md | 2 - docs/content/latest/deploy/multi-dc/_index.md | 6 +- .../deploy/multi-dc/async-replication.md | 22 +- .../public-clouds/aws/cloudformation.md | 8 +- .../public-clouds/aws/manual-deployment.md | 6 +- .../deploy/public-clouds/aws/terraform.md | 8 +- .../latest/deploy/public-clouds/azure/aks.md | 6 +- .../deploy/public-clouds/azure/azure-arm.md | 8 +- .../deploy/public-clouds/azure/terraform.md | 12 +- .../gcp/gcp-deployment-manager.md | 6 +- .../latest/deploy/public-clouds/gcp/gke.md | 6 +- .../deploy/public-clouds/gcp/terraform.md | 6 +- .../develop/learn/acid-transactions-ycql.md | 10 +- .../develop/learn/acid-transactions-ysql.md | 4 +- .../latest/develop/learn/aggregations-ycql.md | 16 +- .../latest/develop/learn/aggregations-ysql.md | 4 +- .../develop/learn/batch-operations-ycql.md | 3 +- .../develop/learn/batch-operations-ysql.md | 2 +- .../develop/learn/data-modeling-ycql.md | 6 +- .../develop/learn/data-modeling-ysql.md | 4 +- .../latest/develop/learn/data-types-ycql.md | 10 +- .../latest/develop/learn/data-types-ysql.md | 4 +- .../develop/learn/date-and-time-ycql.md | 4 +- .../develop/learn/date-and-time-ysql.md | 4 +- .../content/latest/develop/learn/sql-nosql.md | 4 +- .../develop/learn/strings-and-text-ycql.md | 4 +- .../develop/learn/strings-and-text-ysql.md | 28 +- .../develop/learn/ttl-data-expiration-ycql.md | 21 +- .../develop/learn/ttl-data-expiration-ysql.md | 4 +- .../realworld-apps/iot-spark-kafka-ksql.md | 6 +- docs/content/latest/explore/_index.md | 4 +- .../point-in-time-recovery-ycql.md | 4 +- .../point-in-time-recovery-ysql.md | 92 +- .../latest/explore/fault-tolerance/docker.md | 10 +- .../explore/fault-tolerance/kubernetes.md | 10 +- .../latest/explore/fault-tolerance/linux.md | 16 +- .../latest/explore/fault-tolerance/macos.md | 16 +- .../latest/explore/indexes-constraints/gin.md | 2 +- .../indexes-constraints/primary-key-ysql.md | 4 +- .../latest/explore/json-support/jsonb-ycql.md | 12 +- .../latest/explore/json-support/jsonb-ysql.md | 47 +- .../explore/linear-scalability/_index.md | 2 +- .../scaling-transactions.md | 6 +- .../linear-scalability/sharding-data.md | 8 +- .../asynchronous-replication-ycql.md | 10 +- .../asynchronous-replication-ysql.md | 6 +- .../read-replicas-ycql.md | 76 +- .../row-level-geo-partitioning.md | 3 +- .../synchronous-replication-ycql.md | 4 +- .../synchronous-replication-ysql.md | 4 +- .../latest/explore/observability/_index.md | 6 +- .../observability/grafana-dashboard/macos.md | 24 +- .../prometheus-integration/docker.md | 10 +- .../prometheus-integration/kubernetes.md | 8 +- .../prometheus-integration/linux.md | 10 +- .../prometheus-integration/macos.md | 10 +- .../query-1-performance/query-tuning-intro.md | 16 +- .../latest/explore/security/security.md | 16 +- .../distributed-transactions-ycql.md | 6 +- .../distributed-transactions-ysql.md | 26 +- .../explore/transactions/explicit-locking.md | 8 +- .../explore/transactions/isolation-levels.md | 14 +- .../explore/ysql-language-features/_index.md | 4 +- .../advanced-features/savepoints.md | 14 +- .../advanced-features/views.md | 30 +- .../ysql-language-features/data-types.md | 4 +- .../going-beyond-sql/follower-reads-ycql.md | 2 +- docs/content/latest/faq/compatibility.md | 14 +- docs/content/latest/faq/general.md | 10 +- docs/content/latest/faq/yugabyte-platform.md | 4 +- .../latest/integrations/apache-kafka.md | 6 +- .../latest/integrations/apache-spark/scala.md | 2 +- .../latest/integrations/hasura/graphql.md | 8 +- .../latest/integrations/hasura/hasura-1.md | 22 +- docs/content/latest/integrations/liquibase.md | 27 +- .../latest/manage/backup-restore/_index.md | 4 +- .../backup-restore/back-up-data-ycql.md | 6 +- .../manage/backup-restore/back-up-data.md | 18 +- .../backup-restore/point-in-time-recovery.md | 2 +- .../backup-restore/restore-data-ycql.md | 6 +- .../manage/backup-restore/restore-data.md | 14 +- .../manage/backup-restore/snapshot-ysql.md | 10 +- .../manage/backup-restore/snapshots-ycql.md | 14 +- .../manage/data-migration/ycql/bulk-export.md | 8 +- .../manage/data-migration/ycql/bulk-import.md | 14 +- .../latest/manage/upgrade-deployment.md | 3 - .../migrate/migrate-from-postgresql/_index.md | 3 +- .../migrate-from-postgresql/export-data.md | 8 +- .../migrate-from-postgresql/migrate-schema.md | 4 +- .../migrate/migration-process-overview.md | 24 +- docs/content/latest/quick-start/_index.md | 2 +- .../latest/quick-start/build-apps/_index.html | 2 +- .../quick-start/build-apps/csharp/ysql.md | 18 +- .../build-apps/java/ysql-yb-jdbc.md | 15 +- .../quick-start/build-apps/nodejs/ycql.md | 2 +- .../quick-start/build-apps/nodejs/ysql-pg.md | 4 +- .../quick-start/build-apps/ruby/ysql-pg.md | 2 +- .../latest/quick-start/install/docker.md | 2 +- .../latest/quick-start/install/kubernetes.md | 2 +- .../latest/quick-start/install/linux.md | 4 +- .../latest/quick-start/install/macos.md | 2 +- .../reference/configuration/yb-master.md | 4 +- .../reference/configuration/yb-tserver.md | 8 +- .../reference/configuration/yugabyted.md | 8 +- .../reference/drivers/ysql-client-drivers.md | 4 +- docs/content/latest/releases/_index.md | 96 ++ .../releases/earlier-releases/_index.md | 68 -- .../releases/earlier-releases/v1.2.10.md | 82 -- .../releases/earlier-releases/v1.2.11.md | 109 --- .../releases/earlier-releases/v1.2.12.md | 74 -- .../releases/earlier-releases/v1.2.4.md | 71 -- .../releases/earlier-releases/v1.2.5.md | 72 -- .../releases/earlier-releases/v1.2.6.md | 60 -- .../releases/earlier-releases/v1.2.8.md | 105 --- .../releases/earlier-releases/v1.2.9.md | 98 -- .../releases/earlier-releases/v1.3.0.md | 101 --- .../releases/earlier-releases/v1.3.1.md | 92 -- .../releases/earlier-releases/v2.0.0.md | 106 --- .../releases/earlier-releases/v2.0.1.md | 129 --- .../releases/earlier-releases/v2.0.10.md | 77 -- .../releases/earlier-releases/v2.0.11.md | 97 -- .../releases/earlier-releases/v2.0.3.md | 107 --- .../releases/earlier-releases/v2.0.5.md | 101 --- .../releases/earlier-releases/v2.0.6.md | 87 -- .../releases/earlier-releases/v2.0.7.md | 70 -- .../releases/earlier-releases/v2.0.8.md | 79 -- .../releases/earlier-releases/v2.0.9.md | 92 -- .../releases/earlier-releases/v2.1.0.md | 127 --- .../releases/earlier-releases/v2.1.1.md | 59 -- .../releases/earlier-releases/v2.1.2.md | 84 -- .../releases/earlier-releases/v2.1.3.md | 114 --- .../releases/earlier-releases/v2.1.4.md | 95 -- .../releases/earlier-releases/v2.1.5.md | 98 -- .../releases/earlier-releases/v2.1.6.md | 73 -- .../releases/earlier-releases/v2.1.8.md | 132 --- .../releases/earlier-releases/v2.3.0.md | 186 ---- .../releases/earlier-releases/v2.3.1.md | 59 -- .../releases/earlier-releases/v2.3.2.md | 90 -- .../releases/earlier-releases/v2.3.3.md | 130 --- .../latest/releases/release-notes/v1.2.md | 605 +++++++++++++ .../latest/releases/release-notes/v1.3.md | 190 ++++ .../latest/releases/release-notes/v2.0.md | 847 ++++++++++++++++++ .../latest/releases/release-notes/v2.1.md | 663 ++++++++++++++ .../v2.11.md} | 26 +- .../v2.12.md} | 17 +- .../v2.2.0.md => release-notes/v2.2.md} | 99 +- .../latest/releases/release-notes/v2.3.md | 425 +++++++++ .../v2.4.md | 6 +- .../v2.5.md | 55 +- .../v2.6.md | 8 +- .../v2.7.md | 6 +- .../v2.8.md | 6 +- .../v2.9.md | 7 +- .../latest/releases/releases-overview.md | 88 -- docs/content/latest/releases/versioning.md | 2 +- .../latest/releases/whats-new/_index.md | 41 - .../audit-logging/audit-logging-ycql.md | 14 +- .../audit-logging/audit-logging-ysql.md | 20 +- .../object-audit-logging-ysql.md | 46 +- .../session-audit-logging-ysql.md | 37 +- .../latest/secure/authentication/_index.md | 1 - .../host-based-authentication.md | 12 +- .../ldap-authentication-ycql.md | 6 +- .../ldap-authentication-ysql.md | 12 +- .../authentication/password-authentication.md | 70 +- .../authentication/trust-authentication.md | 11 +- .../latest/secure/authorization/_index.md | 6 +- .../authorization/column-level-security.md | 150 ++-- .../secure/authorization/create-roles-ycql.md | 10 +- .../secure/authorization/create-roles.md | 10 +- .../secure/authorization/rbac-model-ycql.md | 4 +- .../latest/secure/authorization/rbac-model.md | 4 +- .../authorization/row-level-security.md | 263 +++--- .../authorization/ycql-grant-permissions.md | 12 +- .../authorization/ysql-grant-permissions.md | 6 +- .../secure/enable-authentication/ycql.md | 28 +- .../secure/enable-authentication/yedis.md | 6 +- .../secure/enable-authentication/ysql.md | 12 +- .../ysql_hba_conf-configuration.md | 4 +- .../latest/secure/security-checklist.md | 6 +- .../latest/secure/tls-encryption/_index.md | 6 +- .../secure/tls-encryption/client-to-server.md | 2 +- .../tls-encryption/connect-to-cluster.md | 8 +- .../secure/tls-encryption/server-to-server.md | 13 +- .../tls-encryption/tls-authentication.md | 2 +- docs/content/latest/tools/dbeaver-ycql.md | 12 +- docs/content/latest/tools/dbeaver-ysql.md | 12 +- docs/content/latest/troubleshoot/_index.md | 10 +- .../latest/troubleshoot/cluster/_index.md | 6 +- .../troubleshoot/cluster/connect-ycql.md | 1 - .../troubleshoot/cluster/recover_server.md | 20 +- .../troubleshoot/cluster/replace_tserver.md | 18 +- .../latest/troubleshoot/nodes/_index.md | 12 +- .../latest/troubleshoot/nodes/check-logs.md | 4 +- .../troubleshoot/nodes/check-processes.md | 2 - .../latest/troubleshoot/nodes/check-stats.md | 4 +- .../latest/troubleshoot/nodes/recover-disk.md | 2 +- .../troubleshoot/nodes/trouble-common.md | 18 +- docs/content/latest/troubleshoot/overview.md | 8 +- .../develop/client-drivers/yedis/csharp.md | 2 +- .../cloud-admin/cloud-billing-costs.md | 30 +- .../cloud-vpcs/cloud-vpc-intro.md | 2 +- .../cloud-vpcs/cloud-vpc-setup.md | 2 +- .../cloud-connect/connect-applications.md | 4 +- .../cloud-connect/connect-client-shell.md | 2 +- .../cloud-connect/connect-cloud-shell.md | 6 +- .../cloud-examples/hasura-cloud.md | 2 +- .../cloud-examples/hasura-sample-app.md | 4 +- .../spring-boot/spring-boot-mini.md | 8 +- .../latest/yugabyte-cloud/cloud-faq.md | 18 +- .../latest/yugabyte-cloud/cloud-overview.md | 20 +- .../cloud-build-apps/_index.md | 2 +- .../cloud-build-apps/cloud-ysql-c.md | 4 +- .../cloud-build-apps/cloud-ysql-cpp.md | 14 +- .../cloud-build-apps/cloud-ysql-csharp.md | 10 +- .../cloud-build-apps/cloud-ysql-go.md | 2 +- .../cloud-build-apps/cloud-ysql-node.md | 4 +- .../cloud-build-apps/cloud-ysql-php.md | 18 +- .../cloud-build-apps/cloud-ysql-python.md | 2 +- .../cloud-build-apps/cloud-ysql-ruby.md | 2 +- .../cloud-build-apps/cloud-ysql-rust.md | 6 +- .../cloud-build-apps/cloud-ysql-yb-jdbc.md | 2 +- .../cloud-quickstart/qs-connect.md | 4 +- .../cloud-quickstart/qs-data.md | 2 +- .../cloud-secure-clusters/cloud-users.md | 2 +- .../cloud-security/cloud-security-features.md | 2 +- .../yugabyte-cloud/cloud-troubleshoot.md | 2 +- .../latest/yugabyte-cloud/release-notes.md | 2 +- .../back-up-restore-k8s.md | 7 +- .../back-up-restore-yp.md | 7 +- .../ldap-authentication.md | 12 +- .../back-up-universe-data/ysql.md | 2 +- .../schedule-data-backups/ysql.md | 6 +- .../set-up-cloud-provider/aws.md | 21 +- .../set-up-cloud-provider/azure.md | 28 +- .../set-up-cloud-provider/gcp.md | 22 +- .../set-up-cloud-provider/kubernetes.md | 46 +- .../set-up-cloud-provider/on-premises.md | 57 +- .../set-up-cloud-provider/openshift.md | 34 +- .../set-up-cloud-provider/vmware-tanzu.md | 42 +- .../create-deployments/_index.md | 2 +- .../async-replication-platform.md | 10 +- .../create-universe-multi-cloud.md | 12 +- .../create-universe-multi-region.md | 40 +- .../create-universe-multi-zone-kubernetes.md | 18 +- .../create-universe-multi-zone.md | 30 +- .../create-deployments/read-replicas.md | 6 +- .../prepare-environment/aws.md | 30 +- .../prepare-environment/azure.md | 22 +- .../prepare-environment/gcp.md | 12 +- .../prepare-environment/kubernetes.md | 12 +- .../prepare-environment/on-premises.md | 20 +- .../prepare-environment/openshift.md | 20 +- .../manage-deployments/remove-nodes.md | 8 +- .../yugabyte-platform/overview/_index.md | 6 +- .../overview/configure/aws.md | 12 +- .../overview/configure/azure.md | 10 +- .../overview/configure/gcp.md | 16 +- .../overview/configure/kubernetes.md | 10 +- .../overview/configure/onprem.md | 10 +- .../overview/install/kubernetes.md | 6 +- .../overview/install/private-cloud.md | 6 +- .../overview/install/public-cloud.md | 8 +- .../security/ldap-authentication-platform.md | 10 +- .../security/security-checklist-yp.md | 2 +- .../stable/explore/indexes-constraints/gin.md | 2 +- .../advanced-features/savepoints.md | 14 +- .../ysql-language-features/data-types.md | 2 +- .../quick-start/build-apps/csharp/ysql.md | 18 +- .../quick-start/build-apps/nodejs/ycql.md | 2 +- .../quick-start/build-apps/nodejs/ysql-pg.md | 2 +- .../quick-start/build-apps/csharp/ysql.md | 6 +- .../quick-start/build-apps/csharp/ysql.md | 4 +- .../quick-start/build-apps/nodejs/ysql-pg.md | 2 +- .../ysql-language-features/data-types.md | 16 +- .../quick-start/build-apps/csharp/ysql.md | 4 +- .../quick-start/build-apps/nodejs/ysql-pg.md | 2 +- .../ysql-language-features/data-types.md | 2 +- .../quick-start/build-apps/csharp/ysql.md | 4 +- .../quick-start/build-apps/nodejs/ysql-pg.md | 2 +- .../ysql-language-features/data-types.md | 2 +- .../quick-start/build-apps/csharp/ysql.md | 18 +- .../quick-start/build-apps/nodejs/ysql-pg.md | 2 +- 372 files changed, 4695 insertions(+), 5271 deletions(-) create mode 100644 docs/content/latest/releases/_index.md delete mode 100644 docs/content/latest/releases/earlier-releases/_index.md delete mode 100644 docs/content/latest/releases/earlier-releases/v1.2.10.md delete mode 100644 docs/content/latest/releases/earlier-releases/v1.2.11.md delete mode 100644 docs/content/latest/releases/earlier-releases/v1.2.12.md delete mode 100644 docs/content/latest/releases/earlier-releases/v1.2.4.md delete mode 100644 docs/content/latest/releases/earlier-releases/v1.2.5.md delete mode 100644 docs/content/latest/releases/earlier-releases/v1.2.6.md delete mode 100644 docs/content/latest/releases/earlier-releases/v1.2.8.md delete mode 100644 docs/content/latest/releases/earlier-releases/v1.2.9.md delete mode 100644 docs/content/latest/releases/earlier-releases/v1.3.0.md delete mode 100644 docs/content/latest/releases/earlier-releases/v1.3.1.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.0.0.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.0.1.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.0.10.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.0.11.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.0.3.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.0.5.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.0.6.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.0.7.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.0.8.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.0.9.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.1.0.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.1.1.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.1.2.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.1.3.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.1.4.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.1.5.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.1.6.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.1.8.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.3.0.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.3.1.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.3.2.md delete mode 100644 docs/content/latest/releases/earlier-releases/v2.3.3.md create mode 100644 docs/content/latest/releases/release-notes/v1.2.md create mode 100644 docs/content/latest/releases/release-notes/v1.3.md create mode 100644 docs/content/latest/releases/release-notes/v2.0.md create mode 100644 docs/content/latest/releases/release-notes/v2.1.md rename docs/content/latest/releases/{whats-new/latest-release.md => release-notes/v2.11.md} (98%) rename docs/content/latest/releases/{whats-new/stable-release.md => release-notes/v2.12.md} (94%) rename docs/content/latest/releases/{earlier-releases/v2.2.0.md => release-notes/v2.2.md} (89%) create mode 100644 docs/content/latest/releases/release-notes/v2.3.md rename docs/content/latest/releases/{earlier-releases => release-notes}/v2.4.md (98%) rename docs/content/latest/releases/{earlier-releases => release-notes}/v2.5.md (97%) rename docs/content/latest/releases/{earlier-releases => release-notes}/v2.6.md (99%) rename docs/content/latest/releases/{earlier-releases => release-notes}/v2.7.md (99%) rename docs/content/latest/releases/{earlier-releases => release-notes}/v2.8.md (99%) rename docs/content/latest/releases/{earlier-releases => release-notes}/v2.9.md (98%) delete mode 100644 docs/content/latest/releases/releases-overview.md delete mode 100644 docs/content/latest/releases/whats-new/_index.md diff --git a/docs/config.yaml b/docs/config.yaml index b8f7a7359a12..c910d76f660c 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -3,7 +3,6 @@ baseurl: https://docs.yugabyte.com languageCode: en-us title: YugabyteDB Docs metadataformat: yaml -canonifyurls: false googleAnalytics: UA-104956980-3 pygmentsCodefences: true pygmentsStyle: "pygments" diff --git a/docs/content/latest/_index.html b/docs/content/latest/_index.html index c84573d02e35..57b07fe6c2f5 100644 --- a/docs/content/latest/_index.html +++ b/docs/content/latest/_index.html @@ -7,12 +7,6 @@ weight: 1 --- -{{< note title="New release versioning" >}} - -Starting with v2.2.0, Yugabyte release versions follow a [new release versioning convention](/latest/releases/versioning). The latest release series, denoted by `MAJOR.ODD`, incrementally introduces new features and changes and is intended for development and testing only. Patch releases, denoted by `MAJOR.ODD.PATCH` versioning, can include new features and changes that might break backwards compatibility. For more information, see [Releases overview](/latest/releases/releases-overview). - -{{< /note >}} -
@@ -136,7 +130,7 @@
- +
Integrations
@@ -308,7 +302,7 @@
-->
- +
Get involved
diff --git a/docs/content/latest/admin/_index.md b/docs/content/latest/admin/_index.md index af5532a1572b..bdc68008f47a 100644 --- a/docs/content/latest/admin/_index.md +++ b/docs/content/latest/admin/_index.md @@ -15,7 +15,7 @@ menu: {{< note title="Note" >}} -Information about configuring the [YB-Master](../reference/configuration/yb-master) and [YB-TServer](../reference/configuration/yb-tserver) services is in the [Configuration](../reference/configuration/) section. +Information about configuring the [YB-Master](../reference/configuration/yb-master/) and [YB-TServer](../reference/configuration/yb-tserver/) services is in the [Configuration](../reference/configuration/) section. {{< /note >}} diff --git a/docs/content/latest/admin/yb-admin.md b/docs/content/latest/admin/yb-admin.md index f58ebc509ed3..225007c5e1c6 100644 --- a/docs/content/latest/admin/yb-admin.md +++ b/docs/content/latest/admin/yb-admin.md @@ -1755,7 +1755,7 @@ The time needed to complete a data move depends on the following: {{< /note >}} -For an example of performing a data move and the use of this command, refer to [Change cluster configuration](../../manage/change-cluster-config). +For an example of performing a data move and the use of this command, refer to [Change cluster configuration](../../manage/change-cluster-config/). **Example** diff --git a/docs/content/latest/admin/yb-ctl.md b/docs/content/latest/admin/yb-ctl.md index 20392367bef3..9ee89652cb4c 100644 --- a/docs/content/latest/admin/yb-ctl.md +++ b/docs/content/latest/admin/yb-ctl.md @@ -146,7 +146,7 @@ For details and examples, see [Create a local cluster with custom flags](#create **Example** -To enable [YSQL authentication](../../secure/enable-authentication/ysql), you can use the `--tserver_flags` flag to add the `yb-tserver` [`--ysql_enable-auth`](../yb-tserver/#ysql-enable-auth) flag to the `yb-ctl create | start | restart` commands. +To enable [YSQL authentication](../../secure/enable-authentication/ysql/), you can use the `--tserver_flags` flag to add the `yb-tserver` [`--ysql_enable-auth`](../yb-tserver/#ysql-enable-auth) flag to the `yb-ctl create | start | restart` commands. ```sh $./bin/yb-ctl create --tserver_flags "ysql_enable_auth=true" @@ -487,7 +487,7 @@ $ ./bin/yb-ctl restart - Restart with cloud, region and zone flags ```sh -$ ./bin/yb-ctl restart --placement_info "cloud1.region1.zone1" +$ ./bin/yb-ctl restart --placement_info "cloud1.region1.zone1" ``` ### Restart with custom flags @@ -536,7 +536,7 @@ $ ./bin/yb-ctl wipe_restart #### Wipe and restart with placement info flags ```sh -$ ./bin/yb-ctl wipe_restart --placement_info "cloud1.region1.zone1" +$ ./bin/yb-ctl wipe_restart --placement_info "cloud1.region1.zone1" ``` #### Wipe and restart with custom flags diff --git a/docs/content/latest/admin/yb-ts-cli.md b/docs/content/latest/admin/yb-ts-cli.md index bd0621996136..6fca00cf5fed 100644 --- a/docs/content/latest/admin/yb-ts-cli.md +++ b/docs/content/latest/admin/yb-ts-cli.md @@ -12,7 +12,7 @@ isTocNested: true showAsideToc: true --- -`yb-ts-cli` is a command line tool that can be used to perform an operation on a particular tablet server (`yb-tserver`). Some of the commands perform operations similar to [`yb-admin` commands](../yb-admin). The `yb-admin` commands focus on cluster administration, the `yb-ts-cli` commands apply to specific YB-TServer nodes. +`yb-ts-cli` is a command line tool that can be used to perform an operation on a particular tablet server (`yb-tserver`). Some of the commands perform operations similar to [`yb-admin` commands](../yb-admin/). The `yb-admin` commands focus on cluster administration, the `yb-ts-cli` commands apply to specific YB-TServer nodes. `yb-ts-cli` is a binary file installed with YugabyteDB and is located in the `bin` directory of the YugabyteDB home directory. diff --git a/docs/content/latest/admin/ysql-dump.md b/docs/content/latest/admin/ysql-dump.md index e735ed2d5619..cff27a44c750 100644 --- a/docs/content/latest/admin/ysql-dump.md +++ b/docs/content/latest/admin/ysql-dump.md @@ -15,7 +15,7 @@ showAsideToc: true `ysql_dump` is a utility for backing up a YugabyteDB database into a plain-text, SQL script file. `ysql_dump` makes consistent backups, even if the database is being used concurrently. `ysql_dump` does not block other users accessing the database (readers or writers). -`ysql_dump` only dumps a single database. To backup global objects that are common to all databases in a cluster, such as roles, use [`ysql_dumpall`](../ysql-dumpall). +`ysql_dump` only dumps a single database. To backup global objects that are common to all databases in a cluster, such as roles, use [`ysql_dumpall`](../ysql-dumpall/). Dumps are output in plain-text, SQL script files. Script dumps are plain-text files containing the SQL statements required to reconstruct the database to the state it was in at the time it was saved. To restore from such a script, import it using the [`ysqlsh \i`](../ysqlsh/#-i-filename-include-filename) command. Script files can be used to reconstruct the database even on other machines and other architectures; with some modifications, even on other SQL database products. @@ -295,7 +295,7 @@ This utility also uses the environment variables supported by `libpq`. ## Diagnostics -`ysql_dump` internally executes `SELECT` statements. If you have problems running `ysql_dump`, make sure you are able to select information from the database using, for example, [`ysqlsh`](../ysqlsh). Also, any default connection settings and environment variables used by the `libpq` front-end library will apply. +`ysql_dump` internally executes `SELECT` statements. If you have problems running `ysql_dump`, make sure you are able to select information from the database using, for example, [`ysqlsh`](../ysqlsh/). Also, any default connection settings and environment variables used by the `libpq` front-end library will apply. The database activity of `ysql_dump` is normally collected by the statistics collector. If this is undesirable, you can set parameter `track_counts` to `false` using `PGOPTIONS` or the [`ALTER USER`](../../api/ysql/the-sql-language/statements/dcl_alter_user) statement. @@ -351,5 +351,5 @@ $ ysql_dump -T 'ts_*' mydb > objects_mydb.sql ## See also -- [ysql_dumpall](../ysql-dumpall) -- [ysqlsh](../ysqlsh) +- [ysql_dumpall](../ysql-dumpall/) +- [ysqlsh](../ysqlsh/) diff --git a/docs/content/latest/admin/ysql-dumpall.md b/docs/content/latest/admin/ysql-dumpall.md index dabb220b9014..ece4a70249be 100644 --- a/docs/content/latest/admin/ysql-dumpall.md +++ b/docs/content/latest/admin/ysql-dumpall.md @@ -13,7 +13,7 @@ isTocNested: true showAsideToc: true --- -`ysql_dumpall` is a utility for writing out (“dumping”) all YugabyteDB databases of a cluster into one plain-text, SQL script file. The script file contains SQL statements that can be used as input to `ysqlsh` to restore the databases. It does this by calling [`ysql_dump`](../ysql-dump) for each database in the YugabyteDB cluster. `ysql_dumpall` also dumps global objects that are common to all databases, such as database roles. (`ysql_dump` does not export roles.) +`ysql_dumpall` is a utility for writing out (“dumping”) all YugabyteDB databases of a cluster into one plain-text, SQL script file. The script file contains SQL statements that can be used as input to `ysqlsh` to restore the databases. It does this by calling [`ysql_dump`](../ysql-dump/) for each database in the YugabyteDB cluster. `ysql_dumpall` also dumps global objects that are common to all databases, such as database roles. (`ysql_dump` does not export roles.) Because `ysql_dumpall` reads tables from all databases, you will most likely have to connect as a database superuser in order to produce a complete dump. Also, you will need superuser privileges to execute the saved script in order to be allowed to add roles and create databases. @@ -76,7 +76,7 @@ Specify the superuser username to use when disabling triggers. This is relevant #### -v, --verbose -Specifies verbose mode. This will cause `ysql_dumpall` to output start and stop times to the dump file, and progress messages to standard error. It will also enable verbose output in [`ysql_dump`](../ysql-dump). +Specifies verbose mode. This will cause `ysql_dumpall` to output start and stop times to the dump file, and progress messages to standard error. It will also enable verbose output in [`ysql_dump`](../ysql-dump/). #### --version, -V @@ -216,7 +216,7 @@ This utility also uses the environment variables supported by `libpq`. ## Notes -- Since `ysql_dumpall` calls [`ysql_dump`](../ysql-dump) internally, some diagnostic messages will refer to `ysql_dump`. +- Since `ysql_dumpall` calls [`ysql_dump`](../ysql-dump/) internally, some diagnostic messages will refer to `ysql_dump`. - The [`-c|--clean`](#c-clean) option can be useful even when your intention is to restore the dump script into a fresh cluster. Use of `-c|--clean` authorizes the script to drop and recreate the built-in `yugabyte`, `postgres`, and `template1` databases, ensuring that those databases will retain the same properties (for instance, locale and encoding) that they had in the source cluster. Without the option, those databases will retain their existing database-level properties, as well as any pre-existing contents. - Once restored, it is wise to run `ANALYZE` on each database so the optimizer has useful statistics. You can also run `vacuumdb -a -z` to analyze all databases. - The dump script should not be expected to run completely without errors. In particular, because the script will issue `CREATE ROLE` statements for every role existing in the source cluster, it is certain to get a `role already exists` error for the bootstrap superuser, unless the destination cluster was initialized with a different bootstrap superuser name. This error is harmless and should be ignored. Use of the [`-c|--clean`](#c-clean) option is likely to produce additional harmless error messages about non-existent objects, although you can minimize those by adding [`--if-exists`](#if-exists). @@ -239,5 +239,5 @@ It is not important to which database you connect here since the script file cre ## See Also -- [ysql_dump](../ysql-dump) -- [ysqlsh](../ysqlsh) \ No newline at end of file +- [ysql_dump](../ysql-dump/) +- [ysqlsh](../ysqlsh/) \ No newline at end of file diff --git a/docs/content/latest/admin/ysqlsh.md b/docs/content/latest/admin/ysqlsh.md index b43238471aa9..5304ecee54c0 100644 --- a/docs/content/latest/admin/ysqlsh.md +++ b/docs/content/latest/admin/ysqlsh.md @@ -44,7 +44,7 @@ If you prefer, you can install a standalone version using any of the following m - Using a shell script: ```sh - wget -q -O - https://downloads.yugabyte.com/get_clients.sh | sh + wget -q -O - https://downloads.yugabyte.com/get_clients.sh | sh yugabyte*/bin/ysqlsh ``` @@ -264,9 +264,9 @@ Set the record separator for unaligned output to a zero byte. This is useful for ##### -1, --single-transaction -This option can only be used in combination with one or more `-c` and/or `-f` options. It causes `ysqlsh` to issue a [`BEGIN`](../../api/ysql/the-sql-language/statements/txn_begin) statement before the first such option and a [`COMMIT`](../../api/ysql/the-sql-language/statements/txn_commit) statement after the last one, thereby wrapping all the commands into a single transaction. This ensures that either all the commands complete successfully, or no changes are applied. +This option can only be used in combination with one or more `-c` and/or `-f` options. It causes `ysqlsh` to issue a [`BEGIN`](../../api/ysql/the-sql-language/statements/txn_begin/) statement before the first such option and a [`COMMIT`](../../api/ysql/the-sql-language/statements/txn_commit) statement after the last one, thereby wrapping all the commands into a single transaction. This ensures that either all the commands complete successfully, or no changes are applied. -If the statements themselves contain [`BEGIN`](../../api/ysql/the-sql-language/statements/txn_begin), [`COMMIT`](../../api/ysql/the-sql-language/statements/txn_commit), or [`ROLLBACK`](../../api/ysql/the-sql-language/statements/txn_rollback), this option will not have the desired effects. Also, if an individual statement cannot be executed inside a transaction block, specifying this option will cause the whole transaction to fail. +If the statements themselves contain [`BEGIN`](../../api/ysql/the-sql-language/statements/txn_begin/), [`COMMIT`](../../api/ysql/the-sql-language/statements/txn_commit), or [`ROLLBACK`](../../api/ysql/the-sql-language/statements/txn_rollback), this option will not have the desired effects. Also, if an individual statement cannot be executed inside a transaction block, specifying this option will cause the whole transaction to fail. ##### -?, --help[=*topic*] @@ -1150,7 +1150,7 @@ The specially treated variables are: ##### AUTOCOMMIT -When `on` (the default), each SQL statement is automatically committed upon successful completion. To postpone commit in this mode, you must enter a [`BEGIN`](../../api/ysql/the-sql-language/statements/txn_begin) or [`START TRANSACTION`](../../api/ysql/the-sql-language/statements/) SQL statement. When `off` or unset, SQL statements are not committed until you explicitly issue `COMMIT` or `END` statements. The autocommit-off mode works by issuing an implicit `BEGIN` for you, just before any statement that is not already in a transaction block and is not itself a `BEGIN` or other transaction-control statement, nor a statement that cannot be executed inside a transaction block (such as `VACUUM`). +When `on` (the default), each SQL statement is automatically committed upon successful completion. To postpone commit in this mode, you must enter a [`BEGIN`](../../api/ysql/the-sql-language/statements/txn_begin/) or [`START TRANSACTION`](../../api/ysql/the-sql-language/statements/) SQL statement. When `off` or unset, SQL statements are not committed until you explicitly issue `COMMIT` or `END` statements. The autocommit-off mode works by issuing an implicit `BEGIN` for you, just before any statement that is not already in a transaction block and is not itself a `BEGIN` or other transaction-control statement, nor a statement that cannot be executed inside a transaction block (such as `VACUUM`). {{< note title="Note" >}} @@ -1186,7 +1186,7 @@ The current client character set encoding. This is set every time you connect to ##### FETCH_COUNT -If this variable is set to an integer value greater than `0` (zero), the results of [`SELECT`](../../api/ysql/the-sql-language/statements/dml_select) queries are fetched and displayed in groups of that many rows, rather than the default behavior of collecting the entire result set before display. Therefore, only a limited amount of memory is used, regardless of the size of the result set. Settings of `100` to `1000` are commonly used when enabling this feature. Keep in mind that when using this feature, a query might fail after having already displayed some rows. +If this variable is set to an integer value greater than `0` (zero), the results of [`SELECT`](../../api/ysql/the-sql-language/statements/dml_select/) queries are fetched and displayed in groups of that many rows, rather than the default behavior of collecting the entire result set before display. Therefore, only a limited amount of memory is used, regardless of the size of the result set. Settings of `100` to `1000` are commonly used when enabling this feature. Keep in mind that when using this feature, a query might fail after having already displayed some rows. {{< note title="Tip" >}} @@ -1349,7 +1349,7 @@ The port number at which the database server is listening. ##### %n -The database session user name. (The expansion of this value might change during a database session as the result of the [`SET SESSION AUTHORIZATION`](../../api/ysql/the-sql-language/statements/dcl_set_session_authorization) statement.) +The database session user name. (The expansion of this value might change during a database session as the result of the [`SET SESSION AUTHORIZATION`](../../api/ysql/the-sql-language/statements/dcl_set_session_authorization/) statement.) ##### %/ @@ -1361,7 +1361,7 @@ Like `%/`, but the output is `~` (tilde) if the database is your default databas ##### %# -If the session user is a database superuser, then a `#`, otherwise a `>`. (The expansion of this value might change during a database session as the result of the [`SET SESSION AUTHORIZATION`](../../api/ysql/the-sql-language/statements/dcl_set_session_authorization) statement.) +If the session user is a database superuser, then a `#`, otherwise a `>`. (The expansion of this value might change during a database session as the result of the [`SET SESSION AUTHORIZATION`](../../api/ysql/the-sql-language/statements/dcl_set_session_authorization/) statement.) ##### %p @@ -1516,7 +1516,7 @@ testdb=> \d my_table Column | Type | Collation | Nullable | Default --------+---------+-----------+----------+--------- first | integer | | not null | 0 - second | text | | | + second | text | | | ``` Now you change the prompt to something more interesting: @@ -1611,7 +1611,7 @@ When suitable, query results can be shown in a crosstab representation with the ```plpgsql testdb=> SELECT first, second, first > 2 AS gt2 FROM my_table; - first | second | gt2 + first | second | gt2 -------+--------+----- 1 | one | f 2 | two | f @@ -1620,11 +1620,11 @@ testdb=> SELECT first, second, first > 2 AS gt2 FROM my_table; (4 rows) testdb=> \crosstabview first second - first | one | two | three | four + first | one | two | three | four -------+-----+-----+-------+------ - 1 | f | | | - 2 | | f | | - 3 | | | t | + 1 | f | | | + 2 | | f | | + 3 | | | t | 4 | | | | t (4 rows) ``` @@ -1636,7 +1636,7 @@ testdb=> SELECT t1.first as "A", t2.first+100 AS "B", t1.first*(t2.first+100) as testdb(> row_number() over(order by t2.first) AS ord testdb(> FROM my_table t1 CROSS JOIN my_table t2 ORDER BY 1 DESC testdb(> \crosstabview "A" "B" "AxB" ord - A | 101 | 102 | 103 | 104 + A | 101 | 102 | 103 | 104 ---+-----+-----+-----+----- 4 | 404 | 408 | 412 | 416 3 | 303 | 306 | 309 | 312 diff --git a/docs/content/latest/api/ycql/_index.md b/docs/content/latest/api/ycql/_index.md index 76cfa7a30d2d..cb8aaea0ca9a 100644 --- a/docs/content/latest/api/ycql/_index.md +++ b/docs/content/latest/api/ycql/_index.md @@ -20,7 +20,7 @@ showAsideToc: true ## Introduction -Yugabyte Cloud Query Language (YCQL) is a semi-relational SQL API that is best fit for internet-scale OLTP and HTAP applications needing massive data ingestion and blazing-fast queries. It supports strongly consistent secondary indexes, a native JSON column type, and distributed transactions. It has its roots in the [Cassandra Query Language (CQL)](http://cassandra.apache.org/doc/latest/cql/index.html). +Yugabyte Cloud Query Language (YCQL) is a semi-relational SQL API that is best fit for internet-scale OLTP and HTAP applications needing massive data ingestion and blazing-fast queries. It supports strongly consistent secondary indexes, a native JSON column type, and distributed transactions. It has its roots in the [Cassandra Query Language (CQL)](http://cassandra.apache.org/doc/latest/cql/index.html). This page covers the following YCQL features. @@ -44,7 +44,7 @@ Statement | Description | ----------|-------------| [`ALTER TABLE`](ddl_alter_table) | Alter a table | [`ALTER KEYSPACE`](ddl_alter_keyspace) | Alter a keyspace | -[`CREATE INDEX`](ddl_create_index) | Create a new index on a table | +[`CREATE INDEX`](ddl_create_index/) | Create a new index on a table | [`CREATE KEYSPACE`](ddl_create_keyspace) | Create a new keyspace | [`CREATE TABLE`](ddl_create_table) | Create a new table | [`CREATE TYPE`](ddl_create_type) | Create a user-defined data type | @@ -87,9 +87,9 @@ Data manipulation language (DML) statements are used to read from and write to t Statement | Description | ----------|-------------| [`INSERT`](dml_insert) | Insert rows into a table | -[`SELECT`](dml_select) | Select rows from a table | -[`UPDATE`](dml_update) | Update rows in a table | -[`DELETE`](dml_delete) | Delete specific rows from a table | +[`SELECT`](dml_select/) | Select rows from a table | +[`UPDATE`](dml_update/) | Update rows in a table | +[`DELETE`](dml_delete/) | Delete specific rows from a table | [`TRANSACTION`](dml_transaction) | Makes changes to multiple rows in one or more tables in a transaction | [`TRUNCATE`](dml_truncate) | Remove all rows from a table | @@ -97,11 +97,11 @@ Statement | Description | An expression is a finite combination of one or more values, operators, functions, and expressions that specifies a computation. Expressions can be used in the following components. -- The select list of [`SELECT`](dml_select) statement. For example, `SELECT id + 1 FROM sample_table;`. -- The WHERE clause in [`SELECT`](dml_select), [`DELETE`](dml_delete), [`INSERT`](dml_insert), or [`UPDATE`](dml_update). -- The IF clause in [`DELETE`](dml_delete), [`INSERT`](dml_insert), or [`UPDATE`](dml_update). +- The select list of [`SELECT`](dml_select/) statement. For example, `SELECT id + 1 FROM sample_table;`. +- The WHERE clause in [`SELECT`](dml_select/), [`DELETE`](dml_delete/), [`INSERT`](dml_insert), or [`UPDATE`](dml_update/). +- The IF clause in [`DELETE`](dml_delete/), [`INSERT`](dml_insert), or [`UPDATE`](dml_update/). - The VALUES clause in [`INSERT`](dml_insert). -- The SET clause in [`UPDATE`](dml_update). +- The SET clause in [`UPDATE`](dml_update/). Currently, the following expressions are supported. @@ -110,7 +110,7 @@ Expression | Description | [Simple Value](expr_simple) | Column, constant, or null. Column alias cannot be used in expression yet. | [Subscript `[]`](expr_subscript) | Subscripting columns of collection data types | [Operator Call](expr_ocall) | Builtin operators only | -[Function Call](expr_fcall) | Builtin function calls only | +[Function Call](expr_fcall/) | Builtin function calls only | ## Data types @@ -123,7 +123,7 @@ Primitive Type | Allowed in Key | Type Parameters | Description | [`BOOLEAN`](type_bool) | Yes | - | Boolean | [`COUNTER`](type_int) | No | - | 64-bit signed integer | [`DECIMAL`](type_number) | Yes | - | Exact, arbitrary-precision number, no upper-bound on decimal precision | -[`DATE`](type_datetime) | Yes | - | Date | +[`DATE`](type_datetime/) | Yes | - | Date | [`DOUBLE`](type_number) | Yes | - | 64-bit, inexact, floating-point number | [`FLOAT`](type_number) | Yes | - | 64-bit, inexact, floating-point number | [`FROZEN`](type_frozen) | Yes | 1 | Collection in binary format | @@ -134,8 +134,8 @@ Primitive Type | Allowed in Key | Type Parameters | Description | [`SET`](type_collection) | No | 1 | Collection of unique elements | [`SMALLINT`](type_int) | Yes | - | 16-bit signed integer | [`TEXT` | `VARCHAR`](type_text) | Yes | - | String of Unicode characters | -[`TIME`](type_datetime) | Yes | - | Time of day | -[`TIMESTAMP`](type_datetime) | Yes | - | Date-and-time | +[`TIME`](type_datetime/) | Yes | - | Time of day | +[`TIMESTAMP`](type_datetime/) | Yes | - | Date-and-time | [`TIMEUUID`](type_uuid) | Yes | - | Timed UUID | [`TINYINT`](type_int) | Yes | - | 8-bit signed integer | [`UUID`](type_uuid) | Yes | - | Standard UUID | diff --git a/docs/content/latest/api/ycql/ddl_alter_table.md b/docs/content/latest/api/ycql/ddl_alter_table.md index fd263ece7c74..d1f68824fc67 100644 --- a/docs/content/latest/api/ycql/ddl_alter_table.md +++ b/docs/content/latest/api/ycql/ddl_alter_table.md @@ -150,8 +150,8 @@ CREATE TABLE example.employees ( ## See also - [`CREATE TABLE`](../ddl_create_table) -- [`DELETE`](../dml_delete) +- [`DELETE`](../dml_delete/) - [`DROP TABLE`](../ddl_drop_table) - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) -- [`UPDATE`](../dml_update) +- [`SELECT`](../dml_select/) +- [`UPDATE`](../dml_update/) diff --git a/docs/content/latest/api/ycql/ddl_create_table.md b/docs/content/latest/api/ycql/ddl_create_table.md index a60d2629a4e5..8cc331a89835 100644 --- a/docs/content/latest/api/ycql/ddl_create_table.md +++ b/docs/content/latest/api/ycql/ddl_create_table.md @@ -268,8 +268,8 @@ ycqlsh:example> CREATE TABLE tracking (id int PRIMARY KEY) WITH tablets = 10 AND ## See also - [`ALTER TABLE`](../ddl_alter_table) -- [`DELETE`](../dml_delete) +- [`DELETE`](../dml_delete/) - [`DROP TABLE`](../ddl_drop_table) - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) -- [`UPDATE`](../dml_update) +- [`SELECT`](../dml_select/) +- [`UPDATE`](../dml_update/) diff --git a/docs/content/latest/api/ycql/ddl_drop_index.md b/docs/content/latest/api/ycql/ddl_drop_index.md index bfdddee5e23e..61b00436741b 100644 --- a/docs/content/latest/api/ycql/ddl_drop_index.md +++ b/docs/content/latest/api/ycql/ddl_drop_index.md @@ -56,4 +56,4 @@ ycqlsh:example> DROP INDEX users_by_name; ## See also - [`CREATE TABLE`](../ddl_create_table) -- [`CREATE INDEX`](../ddl_create_index) +- [`CREATE INDEX`](../ddl_create_index/) diff --git a/docs/content/latest/api/ycql/ddl_drop_table.md b/docs/content/latest/api/ycql/ddl_drop_table.md index c0eeb0f6e068..04de2044e5d2 100644 --- a/docs/content/latest/api/ycql/ddl_drop_table.md +++ b/docs/content/latest/api/ycql/ddl_drop_table.md @@ -53,7 +53,7 @@ ycqlsh:example> DROP TABLE users; - [`ALTER TABLE`](../ddl_alter_table) - [`CREATE TABLE`](../ddl_create_table) -- [`DELETE`](../dml_delete) +- [`DELETE`](../dml_delete/) - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) -- [`UPDATE`](../dml_update) +- [`SELECT`](../dml_select/) +- [`UPDATE`](../dml_update/) diff --git a/docs/content/latest/api/ycql/dml_delete.md b/docs/content/latest/api/ycql/dml_delete.md index bd6f7c4a0efa..232bb9a542d9 100644 --- a/docs/content/latest/api/ycql/dml_delete.md +++ b/docs/content/latest/api/ycql/dml_delete.md @@ -2,7 +2,7 @@ title: DELETE statement [YCQL] headerTitle: DELETE linkTitle: DELETE -description: Use the DELETE statement to remove rows from a specified table that meet a given condition. +description: Use the DELETE statement to remove rows from a specified table that meet a given condition. menu: latest: parent: api-cassandra @@ -27,9 +27,9 @@ Use the `DELETE` statement to remove rows from a specified table that meet a giv ### Grammar ``` -delete ::= DELETE FROM table_name - [ USING TIMESTAMP timestamp_expression ] WHERE - where_expression [ IF { [ NOT ] EXISTS | if_expression } ] +delete ::= DELETE FROM table_name + [ USING TIMESTAMP timestamp_expression ] WHERE + where_expression [ IF { [ NOT ] EXISTS | if_expression } ] [ RETURNS STATUS AS ROW ] ``` @@ -60,7 +60,7 @@ Where - The `if_expression` can only apply to non-key columns (regular columns). - The `if_expression` can contain any logical and boolean operators. - Deleting only some column values from a row is not yet supported. -- `IF EXISTS` and `IF NOT EXISTS` options are mostly for symmetry with the [`INSERT`](../dml_insert) and [`UPDATE`](../dml_update) commands. +- `IF EXISTS` and `IF NOT EXISTS` options are mostly for symmetry with the [`INSERT`](../dml_insert) and [`UPDATE`](../dml_update/) commands. - `IF EXISTS` works like a normal delete but additionally returns whether the delete was applied (a row was found with that primary key). - `IF NOT EXISTS` is effectively a no-op since rows that do not exist cannot be deleted (but returns whether no row was found with that primary key). @@ -73,9 +73,9 @@ The `timestamp_expression` must be an integer value (or a bind variable marker f ### Delete a row from a table ```sql -ycqlsh:example> CREATE TABLE employees(department_id INT, - employee_id INT, - name TEXT, +ycqlsh:example> CREATE TABLE employees(department_id INT, + employee_id INT, + name TEXT, PRIMARY KEY(department_id, employee_id)); ``` @@ -290,7 +290,7 @@ See examples in [batch docs](../batch#row-status). - [`CREATE TABLE`](../ddl_create_table) - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) -- [`UPDATE`](../dml_update) +- [`SELECT`](../dml_select/) +- [`UPDATE`](../dml_update/) - [`TRUNCATE`](../dml_truncate) - [`Expression`](..#expressions) diff --git a/docs/content/latest/api/ycql/dml_insert.md b/docs/content/latest/api/ycql/dml_insert.md index fcd675b24edb..1486cf899503 100644 --- a/docs/content/latest/api/ycql/dml_insert.md +++ b/docs/content/latest/api/ycql/dml_insert.md @@ -43,10 +43,10 @@ ttl_or_timestamp_expression = 'TTL' ttl_expression | 'TIMESTAMP' timestamp_expre ### Grammar ``` -insert ::= INSERT INTO table_name ( column_name [ , ... ] ) VALUES ( - expression [ , ... ] ) - [ IF { [ NOT ] EXISTS | if_expression } ] - [ USING using_expression ] +insert ::= INSERT INTO table_name ( column_name [ , ... ] ) VALUES ( + expression [ , ... ] ) + [ IF { [ NOT ] EXISTS | if_expression } ] + [ USING using_expression ] [ RETURNS STATUS AS ROW ] ``` @@ -59,7 +59,7 @@ Where ## Semantics -- An error is raised if the specified `table_name` does not exist. +- An error is raised if the specified `table_name` does not exist. - The columns list must include all primary key columns. - The `USING TIMESTAMP` clause indicates you would like to perform the INSERT as if it was done at the timestamp provided by the user. The timestamp is the number of microseconds since epoch. @@ -68,7 +68,7 @@ Where - **NOTE**: You should either use the `USING TIMESTAMP` clause in all of your statements or none of them. Using a mix of statements where some have `USING TIMESTAMP` and others do not will lead to very confusing results. -- Inserting rows with TTL is not supported on tables with [transactions enabled](./../ddl_create_table#table-properties-1). +- Inserting rows with TTL is not supported on tables with [transactions enabled](./../ddl_create_table#table-properties-1). ### `VALUES` clause @@ -271,7 +271,7 @@ See examples in [batch docs](../batch#row-status). ## See also - [`CREATE TABLE`](../ddl_create_table) -- [`DELETE`](../dml_delete) -- [`SELECT`](../dml_select) -- [`UPDATE`](../dml_update) +- [`DELETE`](../dml_delete/) +- [`SELECT`](../dml_select/) +- [`UPDATE`](../dml_update/) - [`Expression`](..#expressions) diff --git a/docs/content/latest/api/ycql/dml_select.md b/docs/content/latest/api/ycql/dml_select.md index 4b43553df1a0..d6b07fc4112d 100644 --- a/docs/content/latest/api/ycql/dml_select.md +++ b/docs/content/latest/api/ycql/dml_select.md @@ -33,7 +33,7 @@ Use the `SELECT` statement to retrieve (part of) rows of specified columns that ### Grammar ``` -select ::= SELECT [ DISTINCT ] { * | column_name [ , column_name ... ] } +select ::= SELECT [ DISTINCT ] { * | column_name [ , column_name ... ] } FROM table_name [ WHERE where_expression ] [ IF where_expression ] @@ -71,7 +71,7 @@ Where - The `where_expression` can specify conditions on any columns including partition, clustering, and regular columns. - The `where_expression` has a restricted list of operators. - - Only `=`, `!=`, `IN` and `NOT IN` operators can be used for conditions on partition columns. + - Only `=`, `!=`, `IN` and `NOT IN` operators can be used for conditions on partition columns. - Only operators `=`, `!=`, `<`, `<=`, `>`, `>=`, `IN` and `NOT IN` can be used for conditions on clustering and regular columns. ### `IF` clause @@ -92,7 +92,7 @@ Some best practices are: - Use equality conditions on all partition columns (to fix the value of the partition key). - Use comparison operators on the clustering columns (tighter restrictions are more valuable for left-most clustering columns). -- Generally, the closer a column is to the beginning of the primary key, the higher the performance gain for setting tighter restrictions on it. +- Generally, the closer a column is to the beginning of the primary key, the higher the performance gain for setting tighter restrictions on it. Ideally, these performance considerations should be taken into account when creating the table schema.{{< /note >}} @@ -101,30 +101,30 @@ Ideally, these performance considerations should be taken into account when crea ### Select all rows from a table ```sql -ycqlsh:example> CREATE TABLE employees(department_id INT, - employee_id INT, +ycqlsh:example> CREATE TABLE employees(department_id INT, + employee_id INT, dept_name TEXT STATIC, - employee_name TEXT, + employee_name TEXT, PRIMARY KEY(department_id, employee_id)); ``` ```sql -ycqlsh:example> INSERT INTO employees(department_id, employee_id, dept_name, employee_name) +ycqlsh:example> INSERT INTO employees(department_id, employee_id, dept_name, employee_name) VALUES (1, 1, 'Accounting', 'John'); ``` ```sql -ycqlsh:example> INSERT INTO employees(department_id, employee_id, dept_name, employee_name) +ycqlsh:example> INSERT INTO employees(department_id, employee_id, dept_name, employee_name) VALUES (1, 2, 'Accounting', 'Jane'); ``` ```sql -ycqlsh:example> INSERT INTO employees(department_id, employee_id, dept_name, employee_name) +ycqlsh:example> INSERT INTO employees(department_id, employee_id, dept_name, employee_name) VALUES (1, 3, 'Accounting', 'John'); ``` ```sql -ycqlsh:example> INSERT INTO employees(department_id, employee_id, dept_name, employee_name) +ycqlsh:example> INSERT INTO employees(department_id, employee_id, dept_name, employee_name) VALUES (2, 1, 'Marketing', 'Joe'); ``` @@ -306,6 +306,6 @@ SELECT * FROM sensor_data WHERE device_id = 1 ORDER BY sensor_id ASC, ts ASC; - [`CREATE TABLE`](../ddl_create_table) - [`INSERT`](../dml_insert) -- [`UPDATE`](../dml_update) -- [`DELETE`](../dml_delete) +- [`UPDATE`](../dml_update/) +- [`DELETE`](../dml_delete/) - [`Expression`](..#expressions) diff --git a/docs/content/latest/api/ycql/dml_transaction.md b/docs/content/latest/api/ycql/dml_transaction.md index b7bf32b0a063..8881429521f9 100644 --- a/docs/content/latest/api/ycql/dml_transaction.md +++ b/docs/content/latest/api/ycql/dml_transaction.md @@ -35,7 +35,7 @@ transaction_block ::= BEGIN TRANSACTION Where -- `insert`, `update`, and `delete` are [INSERT](../dml_insert), [UPDATE](../dml_update), and [DELETE](../dml_delete) statements. +- `insert`, `update`, and `delete` are [INSERT](../dml_insert), [UPDATE](../dml_update/), and [DELETE](../dml_delete/) statements. ### ANSI SQL syntax @@ -140,12 +140,12 @@ ycqlsh:example> SELECT account_name, account_type, balance, writetime(balance) F {{< note Type="Note" >}} -`BEGIN/END TRANSACTION` doesn't currently support `RETURNS STATUS AS ROW`. +`BEGIN/END TRANSACTION` doesn't currently support `RETURNS STATUS AS ROW`. {{< /note >}} ## See also - [`INSERT`](../dml_insert) -- [`UPDATE`](../dml_update) -- [`DELETE`](../dml_delete) +- [`UPDATE`](../dml_update/) +- [`DELETE`](../dml_delete/) diff --git a/docs/content/latest/api/ycql/dml_truncate.md b/docs/content/latest/api/ycql/dml_truncate.md index 1247443ea901..c4aa76f3bcf2 100644 --- a/docs/content/latest/api/ycql/dml_truncate.md +++ b/docs/content/latest/api/ycql/dml_truncate.md @@ -92,6 +92,6 @@ ycqlsh:example> SELECT * FROM employees; - [`CREATE TABLE`](../ddl_create_table) - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) -- [`UPDATE`](../dml_update) -- [`DELETE`](../dml_delete) +- [`SELECT`](../dml_select/) +- [`UPDATE`](../dml_update/) +- [`DELETE`](../dml_delete/) diff --git a/docs/content/latest/api/ycql/dml_update.md b/docs/content/latest/api/ycql/dml_update.md index bb992f5142a0..e57144c54032 100644 --- a/docs/content/latest/api/ycql/dml_update.md +++ b/docs/content/latest/api/ycql/dml_update.md @@ -46,9 +46,9 @@ ttl_or_timestamp_expression = 'TTL' ttl_expression | 'TIMESTAMP' timestamp_expre TTLttl_expressionTIMESTAMPtimestamp_expression ``` -update ::= UPDATE table_name [ USING using_expression ] SET assignment - [ , ... ] WHERE where_expression - [ IF { [ NOT ] EXISTS | if_expression } ] +update ::= UPDATE table_name [ USING using_expression ] SET assignment + [ , ... ] WHERE where_expression + [ IF { [ NOT ] EXISTS | if_expression } ] [ RETURNS STATUS AS ROW ] @@ -70,7 +70,7 @@ Where - **NOTE**: You should either use the `USING TIMESTAMP` clause in all of your statements or none of them. Using a mix of statements where some have `USING TIMESTAMP` and others do not will lead to very confusing results. -- Updating rows `USING TTL` is not supported on tables with [transactions enabled](./../ddl_create_table#table-properties-1). +- Updating rows `USING TTL` is not supported on tables with [transactions enabled](./../ddl_create_table#table-properties-1). ### `WHERE` clause @@ -94,10 +94,10 @@ Where ### Update a value in a table ```sql -ycqlsh:example> CREATE TABLE employees(department_id INT, - employee_id INT, - name TEXT, - age INT, +ycqlsh:example> CREATE TABLE employees(department_id INT, + employee_id INT, + name TEXT, + age INT, PRIMARY KEY(department_id, employee_id)); ``` @@ -272,7 +272,7 @@ See examples in [batch docs](../batch#row-status). ## See also - [`CREATE TABLE`](../ddl_create_table) -- [`DELETE`](../dml_delete) +- [`DELETE`](../dml_delete/) - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) +- [`SELECT`](../dml_select/) - [`Expression`](..#expressions) diff --git a/docs/content/latest/api/ycql/explain.md b/docs/content/latest/api/ycql/explain.md index 22af6f2a4c5a..87c6e81c787d 100644 --- a/docs/content/latest/api/ycql/explain.md +++ b/docs/content/latest/api/ycql/explain.md @@ -32,7 +32,7 @@ explain ::= EXPLAIN { select | update | insert | delete } ## Semantics -Where the target statement is one of the following: [SELECT](../dml_select), [UPDATE](../dml_update), [INSERT](../dml_insert), or [DELETE](../dml_delete). +Where the target statement is one of the following: [SELECT](../dml_select/), [UPDATE](../dml_update/), [INSERT](../dml_insert), or [DELETE](../dml_delete/). ## Examples Create the keyspace, tables and indexes. @@ -213,6 +213,6 @@ cqlsh:imdb> EXPLAIN UPDATE movie_stats SET user_rank = 1 WHERE movie_name = 'm1' ## See also - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) -- [`UPDATE`](../dml_update) -- [`DELETE`](../dml_delete) +- [`SELECT`](../dml_select/) +- [`UPDATE`](../dml_update/) +- [`DELETE`](../dml_delete/) diff --git a/docs/content/latest/api/ycql/expr_fcall.md b/docs/content/latest/api/ycql/expr_fcall.md index 90768c182576..a3573acd0fb0 100644 --- a/docs/content/latest/api/ycql/expr_fcall.md +++ b/docs/content/latest/api/ycql/expr_fcall.md @@ -30,22 +30,22 @@ function_call ::= function_name '(' [ arguments ... ] ')' |----------|-------------|---------------|-------------| | BlobAs\ | \ | ([`BLOB`](../type_blob)) | Converts a value from `BLOB` | | \AsBlob | [`BLOB`](../type_blob) | (\) | Converts a value to `BLOB` | -| [DateOf](../function_datetime/#dateof) | [`TIMESTAMP`](../type_datetime) | ([`TIMEUUID`](../type_uuid)) | Conversion | -| MaxTimeUuid | [`TIMEUUID`](../type_uuid) | ([`TIMESTAMP`](../type_datetime)) | Returns the associated max time uuid | -| MinTimeUuid | [`TIMEUUID`](../type_uuid) | ([`TIMESTAMP`](../type_datetime)) | Returns the associated min time uuid | -| [CurrentDate](../function_datetime/#currentdate-currenttime-and-currenttimestamp) | [`DATE`](../type_datetime) | () | Return the system current date | -| [CurrentTime](../function_datetime/#currentdate-currenttime-and-currenttimestamp) | [`TIME`](../type_datetime) | () | Return the system current time of day | -| [CurrentTimestamp](../function_datetime/#currentdate-currenttime-and-currenttimestamp) | [`TIMESTAMP`](../type_datetime) | () | Return the system current timestamp | +| [DateOf](../function_datetime/#dateof) | [`TIMESTAMP`](../type_datetime/) | ([`TIMEUUID`](../type_uuid)) | Conversion | +| MaxTimeUuid | [`TIMEUUID`](../type_uuid) | ([`TIMESTAMP`](../type_datetime/)) | Returns the associated max time uuid | +| MinTimeUuid | [`TIMEUUID`](../type_uuid) | ([`TIMESTAMP`](../type_datetime/)) | Returns the associated min time uuid | +| [CurrentDate](../function_datetime/#currentdate-currenttime-and-currenttimestamp) | [`DATE`](../type_datetime/) | () | Return the system current date | +| [CurrentTime](../function_datetime/#currentdate-currenttime-and-currenttimestamp) | [`TIME`](../type_datetime/) | () | Return the system current time of day | +| [CurrentTimestamp](../function_datetime/#currentdate-currenttime-and-currenttimestamp) | [`TIMESTAMP`](../type_datetime/) | () | Return the system current timestamp | | [Now](../function_datetime/#now) | [`TIMEUUID`](../type_uuid) | () | Returns the UUID of the current timestamp | | [TTL](#ttl-function) | [`BIGINT`](../type_int) | (\) | Get time-to-live of a column | -| [ToDate](../function_datetime/#todate) | [`DATE`](../type_datetime) | ([`TIMESTAMP`](../type_datetime)) | Conversion | -| [ToDate](../function_datetime/#todate) | [`DATE`](../type_datetime) | ([`TIMEUUID`](../type_uuid)) | Conversion | -| ToTime | [`TIME`](../type_datetime) | ([`TIMESTAMP`](../type_datetime)) | Conversion | -| ToTime | [`TIME`](../type_datetime) | ([`TIMEUUID`](../type_uuid) | Conversion | -| [ToTimestamp](../function_datetime/#totimestamp) | ([`TIMESTAMP`](../type_datetime)) | ([`DATE`](../type_datetime)) | Conversion | -| [ToTimestamp](../function_datetime/#totimestamp) | ([`TIMESTAMP`](../type_datetime)) | (`TIMEUUID`) | Conversion | -| [ToUnixTimestamp](../function_datetime/#tounixtimestamp) | [`BIGINT`](../type_int) | ([`DATE`](../type_datetime)) | Conversion | -| [ToUnixTimestamp](../function_datetime/#tounixtimestamp) | [`BIGINT`](../type_int) | ([`TIMESTAMP`](../type_datetime)) | Conversion | +| [ToDate](../function_datetime/#todate) | [`DATE`](../type_datetime/) | ([`TIMESTAMP`](../type_datetime/)) | Conversion | +| [ToDate](../function_datetime/#todate) | [`DATE`](../type_datetime/) | ([`TIMEUUID`](../type_uuid)) | Conversion | +| ToTime | [`TIME`](../type_datetime/) | ([`TIMESTAMP`](../type_datetime/)) | Conversion | +| ToTime | [`TIME`](../type_datetime/) | ([`TIMEUUID`](../type_uuid) | Conversion | +| [ToTimestamp](../function_datetime/#totimestamp) | ([`TIMESTAMP`](../type_datetime/)) | ([`DATE`](../type_datetime/)) | Conversion | +| [ToTimestamp](../function_datetime/#totimestamp) | ([`TIMESTAMP`](../type_datetime/)) | (`TIMEUUID`) | Conversion | +| [ToUnixTimestamp](../function_datetime/#tounixtimestamp) | [`BIGINT`](../type_int) | ([`DATE`](../type_datetime/)) | Conversion | +| [ToUnixTimestamp](../function_datetime/#tounixtimestamp) | [`BIGINT`](../type_int) | ([`TIMESTAMP`](../type_datetime/)) | Conversion | | [ToUnixTimestamp](../function_datetime/#tounixtimestamp) | [`BIGINT`](../type_int) | ([`TIMEUUID`](../type_uuid)) | Conversion | | [UnixTimestampOf](../function_datetime/#unixtimestampof) | [`BIGINT`](../type_int) | ([`TIMEUUID`](../type_uuid)) | Conversion | | [UUID](../function_datetime/#uuid) | [`UUID`](../type_uuid) | () | Returns a version 4 UUID | diff --git a/docs/content/latest/api/ycql/expr_subscript.md b/docs/content/latest/api/ycql/expr_subscript.md index f3eb6aa6d1db..64df1327de41 100644 --- a/docs/content/latest/api/ycql/expr_subscript.md +++ b/docs/content/latest/api/ycql/expr_subscript.md @@ -14,7 +14,7 @@ isTocNested: true showAsideToc: true --- -Use subscripted expressions to access elements in a multi-element value, such as a map collection by using operator `[]`. Subscripted column expressions can be used when writing the same way as a [column expression](../expr_simple##Column). For example, if `ids` refers to a column of type `LIST`, `ids[7]` refers to the third element of the list `ids`, which can be set in an [UPDATE](../dml_update) statement. +Use subscripted expressions to access elements in a multi-element value, such as a map collection by using operator `[]`. Subscripted column expressions can be used when writing the same way as a [column expression](../expr_simple##Column). For example, if `ids` refers to a column of type `LIST`, `ids[7]` refers to the third element of the list `ids`, which can be set in an [UPDATE](../dml_update/) statement.
  • Subscripted expression can only be applied to columns of type `LIST`, `MAP`, or user-defined data types.
  • Subscripting a `LIST` value with a non-positive index will yield NULL.
  • diff --git a/docs/content/latest/api/ycql/function_datetime.md b/docs/content/latest/api/ycql/function_datetime.md index 390ae93baf48..3aa8ad6d5cac 100644 --- a/docs/content/latest/api/ycql/function_datetime.md +++ b/docs/content/latest/api/ycql/function_datetime.md @@ -3,7 +3,7 @@ title: Date and time functions [YCQL] headerTitle: Date and time functions title: Date and time functions [YCQL] headerTitle: Date and time functions -linkTitle: Date and time +linkTitle: Date and time description: Use date and time functions to work on date and time data types. menu: latest: @@ -16,7 +16,7 @@ isTocNested: false showAsideToc: true --- -This section covers the set of YCQL built-in functions that work on the date and time data types: [`DATE`, `TIME`, `TIMESTAMP`](../type_datetime), or [`TIMEUUID`](../type_uuid). +This section covers the set of YCQL built-in functions that work on the date and time data types: [`DATE`, `TIME`, `TIMESTAMP`](../type_datetime/), or [`TIMEUUID`](../type_uuid). ## currentdate(), currenttime(), and currenttimestamp() @@ -96,7 +96,7 @@ ycqlsh:example> SELECT v FROM test_now WHERE v < now(); This function converts a timestamp or TIMEUUID to the corresponding date. -- It takes in an argument of type `TIMESTAMP` or `TIMEUUID`. +- It takes in an argument of type `TIMESTAMP` or `TIMEUUID`. - The return value is a `DATE`. ```sql @@ -121,7 +121,7 @@ ycqlsh:example> SELECT todate(ts) FROM test_todate; This function converts a date or TIMEUUID to the corresponding timestamp. -- It takes in an argument of type `DATE` or `TIMEUUID`. +- It takes in an argument of type `DATE` or `TIMEUUID`. - The return value is a `TIMESTAMP`. ### Examples @@ -164,7 +164,7 @@ ycqlsh:example> SELECT v FROM test_totimestamp WHERE v < totimestamp(now()); This function converts a TIMEUUID to the corresponding timestamp. -- It takes in an argument of type `TIMEUUID`. +- It takes in an argument of type `TIMEUUID`. - The return value is a `TIMESTAMP`. ### Examples @@ -252,7 +252,7 @@ ycqlsh:example> SELECT v from test_tounixtimestamp WHERE v < tounixtimestamp(now ## unixtimestampof() This function converts TIMEUUID or timestamp to a unix timestamp (which is -equal to the number of millisecond since epoch Thursday, 1 January 1970). +equal to the number of millisecond since epoch Thursday, 1 January 1970). - It takes in an argument of type `TIMEUUID` or type `TIMESTAMP`. - The return value is a `BIGINT`. @@ -338,6 +338,6 @@ ycqlsh:example> SELECT uuid() FROM test_uuid; ## See also -- [`DATE`, `TIME` and `TIMESTAMP`](../type_datetime) +- [`DATE`, `TIME` and `TIMESTAMP`](../type_datetime/) - [`TIMEUUID`](../type_uuid) - [`UUID`](../type_uuid) diff --git a/docs/content/latest/api/ycql/type_datetime.md b/docs/content/latest/api/ycql/type_datetime.md index f2f71aeae663..7f4c59524b24 100644 --- a/docs/content/latest/api/ycql/type_datetime.md +++ b/docs/content/latest/api/ycql/type_datetime.md @@ -38,7 +38,7 @@ type_specification ::= TIMESTAMP | DATE | TIME ### DATE A date is represented using a 32-bit unsigned integer representing the number of days since epoch (January 1, 1970) with no corresponding time value. -Use [INSERT](../dml_insert) or [UPDATE](../dml_update) to add values as an integer (days since epoch) or in the string format shown below. +Use [INSERT](../dml_insert) or [UPDATE](../dml_update/) to add values as an integer (days since epoch) or in the string format shown below. #### Syntax @@ -56,7 +56,7 @@ For example, `2020-07-29`. Values of the `time` data type are encoded as 64-bit signed integers representing the number of nanoseconds since midnight with no corresponding date value. -Use [INSERT](../dml_insert) or [UPDATE](../dml_update) to add values in the following string format, where subseconds (`f`) are optional and if provided, can be less than nanosecond: +Use [INSERT](../dml_insert) or [UPDATE](../dml_update/) to add values in the following string format, where subseconds (`f`) are optional and if provided, can be less than nanosecond: #### Syntax @@ -75,7 +75,7 @@ For example, `12:34:56` or `12:34:56.789` or `12:34:56.123456789`. Values of the `timestamp` data type combines date, time, and time zone, in ISO 8601 format. -Use [INSERT](../dml_insert) or [UPDATE](../dml_update) to add values in the string format shown below, where milliseconds (`f`) are optional. +Use [INSERT](../dml_insert) or [UPDATE](../dml_update/) to add values in the string format shown below, where milliseconds (`f`) are optional. #### Syntax diff --git a/docs/content/latest/api/ysql/_index.md b/docs/content/latest/api/ysql/_index.md index 67e7228a422e..63f2c27bf1c2 100644 --- a/docs/content/latest/api/ysql/_index.md +++ b/docs/content/latest/api/ysql/_index.md @@ -19,7 +19,7 @@ showAsideToc: true ## Introduction -Yugabyte Structured Query Language (YSQL) is an ANSI SQL, fully-relational API that is best fit for scale-out RDBMS applications that need ultra resilience, massive write scalability and geographic data distribution. The YugabyteDB SQL processing layer is built by using the PostgreSQL code (starting with version 11.2) directly. +Yugabyte Structured Query Language (YSQL) is an ANSI SQL, fully-relational API that is best fit for scale-out RDBMS applications that need ultra resilience, massive write scalability and geographic data distribution. The YugabyteDB SQL processing layer is built by using the PostgreSQL code (starting with version 11.2) directly. YSQL therefore supports all of the traditional relational modeling features, such as referential integrity (implemented using a foreign key constraint from a child table to a primary key to its parent table), joins, partial indexes, triggers and stored procedures. It extends the familiar transactional notions into the YugabyteDB Distributed SQL Database architecture. @@ -35,7 +35,7 @@ To find the version of the PostgreSQL processing layer used in YugabyteDB, you c select rpad(version(), 18)||'...' as v; ``` -For the “latest” release series of YugabyteDB, as reflected in this main documentation URL, +For the “latest” release series of YugabyteDB, as reflected in this main documentation URL, the query result shows that the PostgreSQL version is 11.2: ``` @@ -48,7 +48,7 @@ the query result shows that the PostgreSQL version is 11.2: ## Quick Start -You can explore the basics of the YSQL API using the [Quick Start](../../quick-start/explore/ysql) steps. +You can explore the basics of the YSQL API using the [Quick Start](../../quick-start/explore/ysql/) steps. ## The SQL language @@ -60,5 +60,5 @@ This section lists the main elements that support the YugabyteDB SQL language su - [Keywords](keywords). - Names and Qualifiers: Some names are reserved for the system. List of [reserved names](reserved_names). -- Data types: Most PostgreSQL-compatible data types are supported. List of [data types](datatypes). -- [Built-in SQL functions](exprs) +- Data types: Most PostgreSQL-compatible data types are supported. List of [data types](datatypes/). +- [Built-in SQL functions](exprs/) diff --git a/docs/content/latest/api/ysql/datatypes/_index.md b/docs/content/latest/api/ysql/datatypes/_index.md index 247dc44f0a74..5737bb8ed2c4 100644 --- a/docs/content/latest/api/ysql/datatypes/_index.md +++ b/docs/content/latest/api/ysql/datatypes/_index.md @@ -20,7 +20,7 @@ The following table lists the primitive and compound data types in YSQL. | Data type | Alias | Description | |-----------|-------|-------------| -| [`array`](type_array) | | One-dimensional or multidimensional rectilinear array of any data type payload | +| [`array`](type_array/) | | One-dimensional or multidimensional rectilinear array of any data type payload | | [`bigint`](type_numeric) | [`int8`](type_numeric) | Signed eight-byte integer | | [`bigserial`](type_serial) | [`serial8`](type_serial) | Autoincrementing eight-byte integer | | `bit [ (n) ]` 1 | | Fixed-length bit string | @@ -32,13 +32,13 @@ The following table lists the primitive and compound data types in YSQL. | [`character varying [ (n) ]`](type_character) | [`varchar [ (n) ]`](type_character) | Variable-length character string | | `cidr` 1 | | IPv4 or IPv6 network address | | `circle` 1 | | Circle on a plane | -| [`date`](type_datetime) | | Calendar date (year, month, day) | +| [`date`](type_datetime/) | | Calendar date (year, month, day) | | [`double precision`](type_numeric) | [`float8`](type_numeric) | Double precision floating-point number (8 bytes) | | `inet` 1 | | IPv4 or IPv6 host address | | [`integer`](type_numeric) | [`int`, `int4`](type_numeric) | Signed four-byte integer | -| [`interval [ fields ] [ (p) ]`](type_datetime) | | Time span | -| [`json`](type_json) 1 | | Textual JSON data | -| [`jsonb`](type_json) 1 | | Binary JSON data, decomposed | +| [`interval [ fields ] [ (p) ]`](type_datetime/) | | Time span | +| [`json`](type_json/) 1 | | Textual JSON data | +| [`jsonb`](type_json/) 1 | | Binary JSON data, decomposed | | `line` 1 | | Infinite line on a plane | | `lseg` 1 | | Line segment on a plane | | `macaddr` 1 | | Media Access Control (MAC) address | @@ -60,10 +60,10 @@ The following table lists the primitive and compound data types in YSQL. | [`smallserial`](type_serial) | [`serial2`](type_serial) | Autoincrementing two-byte integer | | [`serial`](type_serial) | [`serial4`](type_serial) | Autoincrementing four-byte integer | | [`text`](type_character) | | Variable-length character string | -| [`time [ (p) ] [ without time zone ]`](type_datetime) | | Time of day (no time zone) | -| [`time [ (p) ] with time zone`](type_datetime) | [`timetz`](type_datetime) | Time of day, including time zone | -| [`timestamp [ (p) ] [ without time zone ]`](type_datetime) | | Date and time (no time zone) | -| [`timestamp [ (p) ] with time zone`](type_datetime) | [`timestamptz`](type_datetime) | Date and time, including time zone | +| [`time [ (p) ] [ without time zone ]`](type_datetime/) | | Time of day (no time zone) | +| [`time [ (p) ] with time zone`](type_datetime/) | [`timetz`](type_datetime/) | Time of day, including time zone | +| [`timestamp [ (p) ] [ without time zone ]`](type_datetime/) | | Date and time (no time zone) | +| [`timestamp [ (p) ] with time zone`](type_datetime/) | [`timestamptz`](type_datetime/) | Date and time, including time zone | | `tsquery` 1 | | Text search query | | `tsvector` 1 | | Text search document | | `txid_snapshot` 1 | | Transaction ID snapshot | diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/conceptual-background.md b/docs/content/latest/api/ysql/datatypes/type_datetime/conceptual-background.md index 2c1fae73c5ba..e71f412e29b7 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/conceptual-background.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/conceptual-background.md @@ -12,7 +12,7 @@ isTocNested: true showAsideToc: true --- -The following subsections provide the conceptual background for the accounts of the _date-time_ data types that the table shown in the [Synopsis](../intro/#synopsis) lists and for the operations that the _date-time_ operators and built-in SQL functions perform. +The following subsections provide the conceptual background for the accounts of the _date-time_ data types that the table shown in the [Synopsis](../../type_datetime/) lists and for the operations that the _date-time_ operators and built-in SQL functions perform. - [Absolute time and the UTC Time Standard](#absolute-time-and-the-utc-time-standard) - [Wall-clock-time and local time](#wall-clock-time-and-local-time) @@ -68,12 +68,12 @@ select It quietly succeeds and produces the obvious result. (The _::text_ typecast of a _timestamp_ value uses only as much precision as the value requires.) ```output - min_ts | max_ts + min_ts | max_ts ------------------------+----------------------- 4713-01-01 00:00:00 BC | 294276-01-01 00:00:00 ``` -The values, _4713 BC_ and _294276_ AD, are given in the [table](../intro/#synopsis) in the _"Introduction"_ section to the present _date-time_ data types major section. +The values, _4713 BC_ and _294276_ AD, are given in the [table](../../type_datetime/) in the _"Introduction"_ section to the present _date-time_ data types major section. ## Wall-clock-time and local time @@ -231,7 +231,7 @@ This is the result. (The blank lines were added manually to improve the readabil You can see that, just as the Wikipedia article said, a conventional adjustment was edicted for clocks in the United States during the period from 16:00 _UTC_ through 20:00 _UTC_ on Sunday 18-Nov-1883. During that period (in fact, successively from region to region) everybody "gained" a little time—just as, now, people "gain" one hour on the "fall back" day when Daylight Savings Time ends. For example, people in the _America/Los_Angeles_ zone gained seven minutes and two seconds. Moreover, the offset between these regions and Greenwich UK was adjusted by a small compensating amount at the same transition moment to make it an integral multiple of one hour. -Notice that the time in London was always right—by definition! Meanwhile, other cities in Europe made their corresponding conventional adjustments at later dates. +Notice that the time in London was always right—by definition! Meanwhile, other cities in Europe made their corresponding conventional adjustments at later dates. By the year 2000, all the cities or regions that the query selects, whose timezones the function uses, have settled down to have timezone offsets that are integral multiples of one hour. Notably, some timezones have offsets that are integral multiples of fifteen minutes. Try this: @@ -276,7 +276,7 @@ It was eventually decided that an atomic clock should define the ultimate standa It is now understood that the observable phenomena like day, month, and year cannot be defined as constant integral numbers of seconds. -This realization is formalized in PostgreSQL (and therefore in YSQL) as the so-called _proleptic Gregorian calendar_. +This realization is formalized in PostgreSQL (and therefore in YSQL) as the so-called _proleptic Gregorian calendar_. {{< note title="The proleptic Gregorian calendar." >}}
    The proleptic Gregorian calendar implements the notion of the Western calendar month with its idiosyncrasies: February has 29 days in a leap year and otherwise 28 days; and the other months have either 30 or 31 days. (Lunar months have vanished from the discourse.) So, while one year is usually 365 days, it is sometimes 366 days. The calendar is a mapping between the number of seconds before or after midnight 1970, on the Greenwich Meridian, and the year, calendar month, date, and time of day (in hours, minutes, and seconds) on that same meridian. The mapping cannot be a formula. Rather, it can only be an elaborate look-up table. @@ -305,7 +305,7 @@ Treating one day as exactly 24 hours, one month as 30 days, and one year as 12 m ### Clock-time -Briefly, _clock-time_ is caesium units—or, by convention, seconds, minutes, and hours. +Briefly, _clock-time_ is caesium units—or, by convention, seconds, minutes, and hours. **Note**: Some calendar implementations support [leap seconds](https://www.timeanddate.com/time/leapseconds.html). (When a leap second occurs, its containing minute is 61 seconds and not 60 seconds.) But the implementation that PostgreSQL and YSQL use does not support this notion. The implementation, therefore, can treat hours, minutes, and seconds with strict _clock-time-semantics_ and needs to treat only the larger units with _calendar-time-semantics_. @@ -331,7 +331,7 @@ with v as ( select ( -- The 'America/Los_Angeles' timezone adopted Standard Time at -- some moment between these two timestamptz values. - extract(epoch from '1883-11-19 08:00:00 America/Los_Angeles'::timestamptz) - + extract(epoch from '1883-11-19 08:00:00 America/Los_Angeles'::timestamptz) - extract(epoch from '1883-11-18 08:00:00 America/Los_Angeles'::timestamptz) ) as delta ) @@ -343,7 +343,7 @@ from v; This is the result: ```output - delta (hh:mi:ss) + delta (hh:mi:ss) ------------------ 24:07:02 ``` @@ -362,7 +362,7 @@ select This is the result: ```output - t0 + 24 hours | t0 + 1 day + t0 + 24 hours | t0 + 1 day ------------------------+------------------------ 1883-11-19 07:52:58-08 | 1883-11-19 08:00:00-08 ``` diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/declaring-intervals.md b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/declaring-intervals.md index bed0da36db61..69cc5b3e33a8 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/declaring-intervals.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/declaring-intervals.md @@ -13,7 +13,7 @@ showAsideToc: true --- {{< tip title="Download and [re]install the date-time utilities code." >}} -The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../interval-utilities/) and on the [function interval_mm_dd_ss (interval_parameterization_t)](../interval-representation/internal-representation-model/#function-interval-mm-dd-ss-interval-parameterization-t-returns-interval-mm-dd-ss-t), explained in the section [Modeling the internal representation and comparing the model with the actual implementation](../interval-representation/internal-representation-model/). This is all included in the larger [code kit](../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../type_datetime)_ section describes and uses. +The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../interval-utilities/) and on the [function interval_mm_dd_ss (interval_parameterization_t)](../interval-representation/internal-representation-model/#function-interval-mm-dd-ss-interval-parameterization-t-returns-interval-mm-dd-ss-t), explained in the section [Modeling the internal representation and comparing the model with the actual implementation](../interval-representation/internal-representation-model/). This is all included in the larger [code kit](../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../type_datetime/)_ section describes and uses. Even if you have already installed the code kit, install it again now. Do this because a code example in the section [How does YSQL represent an _interval_ value?](../interval-representation/) redefines one of the _interval_ utility functions. {{< /tip >}} @@ -303,7 +303,7 @@ declare i_hour constant interval hour not null := i_bare; i_minute constant interval minute not null := i_bare; i_second constant interval second not null := i_bare; -begin +begin return case mode when 'bare' then i_bare diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-interval-addition.md b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-interval-addition.md index 759c0d926c2d..9b52283bfddd 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-interval-addition.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-interval-addition.md @@ -13,7 +13,7 @@ showAsideToc: true --- {{< tip title="Download and install the date-time utilities code." >}} -The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../../interval-utilities/). This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime)_ section describes and uses. +The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../../interval-utilities/). This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime/)_ section describes and uses. {{< /tip >}} This section presents a PL/pgSQL implementation of the model that explains how adding two _interval_ values or subtracting one _interval_ value from another works. @@ -88,7 +88,7 @@ This is the result: intermediate model mm_dd_ss: 6.0000 months 2.0000 days 0.0000 seconds ultimate model mm_dd_ss: 6.0000 months 2.0000 days 0.0000 seconds actual mm_dd_ss: 6.0000 months 2.0000 days 0.0000 seconds - + ultimate model result: 6 mons 2 days ``` @@ -108,7 +108,7 @@ This is the result: intermediate model mm_dd_ss: 8.0000 months 56.0000 days 141840.0000 seconds ultimate model mm_dd_ss: 8.0000 months 56.0000 days 141840.0000 seconds actual mm_dd_ss: 8.0000 months 56.0000 days 141840.0000 seconds - + ultimate model result: 8 mons 56 days 39:24:00 ``` diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-interval-comparison.md b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-interval-comparison.md index 03fc57256872..481c2d03a52b 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-interval-comparison.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-interval-comparison.md @@ -13,7 +13,7 @@ showAsideToc: true --- {{< tip title="Download and install the date-time utilities code." >}} -The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../../interval-utilities/). This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime)_ section describes and uses. +The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../../interval-utilities/). This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime/)_ section describes and uses. {{< /tip >}} The semantics of the _interval-interval_ overloads of these comparison operators can be understood in terms of the semantics of the _[justify_interval()](../../justfy-and-extract-epoch/#the-justify-hours-justify-days-and-justify-interval-built-in-functions)_ built-in function: @@ -93,7 +93,7 @@ select It finishes silently, showing that the _assert_ holds, and produces this result: ```output - e1 | e2 + e1 | e2 ---------+--------- i1 = i2 | i1 = i2 ``` diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-number-multiplication.md b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-number-multiplication.md index fe449f34caf4..7b039d8a783c 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-number-multiplication.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/interval-number-multiplication.md @@ -13,7 +13,7 @@ showAsideToc: true --- {{< tip title="Download and install the date-time utilities code." >}} -The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../../interval-utilities/). This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime)_ section describes and uses. +The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../../interval-utilities/). This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime/)_ section describes and uses. {{< /tip >}} This section presents a PL/pgSQL implementation of the model that explains how multiplying or dividing an _interval_ value by a number works. Make sure that you have read the section [Adding or subtracting a pair of _interval_ values](../interval-interval-addition/) before reading this section. @@ -83,7 +83,7 @@ This is the multiplication result: intermediate model mm_dd_ss: 2.4691 months 0.0000 days 0.0000 seconds ultimate model mm_dd_ss: 2.0000 months 14.0000 days 6399.4752 seconds actual mm_dd_ss: 2.0000 months 14.0000 days 6399.4752 seconds - + ultimate model result: 2 mons 14 days 01:46:39.4752 ``` @@ -94,7 +94,7 @@ And this is the division result: intermediate model mm_dd_ss: 1.9753 months 0.0000 days 0.0000 seconds ultimate model mm_dd_ss: 1.0000 months 29.0000 days 22399.8912 seconds actual mm_dd_ss: 1.0000 months 29.0000 days 22399.8912 seconds - + ultimate model result: 1 mon 29 days 06:13:19.8912 ``` @@ -192,7 +192,7 @@ This is the result: intermediate model mm_dd_ss: 1.9200 months 1.9200 days 6912.0000 seconds ultimate model mm_dd_ss: 1.0000 months 28.0000 days 138240.0000 seconds actual mm_dd_ss: 1.0000 months 29.0000 days 51840.0000 seconds - + ultimate model result: 1 mon 28 days 38:24:00 ``` @@ -251,7 +251,7 @@ select This is the result: ```output - actual | model + actual | model ------------------------+------------------------ 1 mon 28 days 21:36:00 | 1 mon 28 days 21:36:00 ``` @@ -267,7 +267,7 @@ select This is the result: ```output - actual | model + actual | model ------------------------+------------------------ 1 mon 29 days 12:28:48 | 1 mon 28 days 36:28:48 ``` @@ -289,7 +289,7 @@ select This is the result: ```output - add then multiply | multiply then add + add then multiply | multiply then add ------------------------+------------------------ 1 mon 29 days 12:28:48 | 1 mon 28 days 36:28:48 ``` @@ -305,7 +305,7 @@ select This is the result: ```output - add then multiply | multiply then add + add then multiply | multiply then add ------------------------+------------------------ 1 mon 28 days 36:28:48 | 1 mon 28 days 36:28:48 ``` diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/moment-interval-overloads-of-plus-and-minus.md b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/moment-interval-overloads-of-plus-and-minus.md index d1a081230548..d081f9ed355b 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/moment-interval-overloads-of-plus-and-minus.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-arithmetic/moment-interval-overloads-of-plus-and-minus.md @@ -13,7 +13,7 @@ showAsideToc: true --- {{< tip title="Download and install the date-time utilities code." >}} -The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../../interval-utilities/). This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime)_ section describes and uses. +The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../../interval-utilities/). This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime/)_ section describes and uses. {{< /tip >}} This section presents PL/pgSQL implementations that model the semantics of the _interval_-moment-overload of the `+` operator for three distinct kinds of _interval_ value: _pure seconds_, _pure days_, and _pure months_. The semantics of the _interval_-moment-overloads of the `-` operator is implied by the semantics of the overload of the `+` operator. @@ -52,7 +52,7 @@ update t set "t0 + 720 hours" = t0 + '720 hours'::interval, "t0 + 30 days" = t0 + '30 days'::interval, "t0 + 1 month" = t0 + '1 month'::interval; - + prepare inspect_result as select t0, @@ -73,12 +73,12 @@ execute inspect_result; This is the result: ```output - t0 | t0 + 720 hours | t0 + 30 days | t0 + 1 month + t0 | t0 + 720 hours | t0 + 30 days | t0 + 1 month ------------------------+------------------------+------------------------+------------------------ 2021-02-19 12:00:00-08 | 2021-03-21 13:00:00-07 | 2021-03-21 12:00:00-07 | 2021-03-19 12:00:00-07 ``` -All the three results are displayed with a negative seven hours _UTC offset_ reflecting the fact that they occur during the Daylight Savings Time period in the United States. The time of day for _"t0 + 720 hours"_ differs by one hour from that for _"t0 + 30 days"_, but the date component is the same for each. The time of day for _"t0 + 30 days"_ is the same as that for _"t0 + 1 month"_, but the date component differs by two days. +All the three results are displayed with a negative seven hours _UTC offset_ reflecting the fact that they occur during the Daylight Savings Time period in the United States. The time of day for _"t0 + 720 hours"_ differs by one hour from that for _"t0 + 30 days"_, but the date component is the same for each. The time of day for _"t0 + 30 days"_ is the same as that for _"t0 + 1 month"_, but the date component differs by two days. You have to think quite hard to understand displayed _timestamptz_ values when you inspect them using a session whose _TimeZone_ setting is _not_ _UTC_ because that setting affects the values that you see. This is very much intended and reflects the _raison d’être_ of the data type. See the section [The plain _timestamp_ and _timestamptz_ data types](../../../type-timestamp/). In particular, this is why the moment before "spring forward" is displayed with an offset of negative _eight_ hours while the moments after "spring forward" are displayed with an offset of negative _seven_ hours. @@ -100,12 +100,12 @@ execute inspect_result; This is the result: ```output - t0 | t0 + 720 hours | t0 + 30 days | t0 + 1 month + t0 | t0 + 720 hours | t0 + 30 days | t0 + 1 month ------------------------+------------------------+------------------------+------------------------ 2021-02-19 20:00:00+00 | 2021-03-21 20:00:00+00 | 2021-03-21 19:00:00+00 | 2021-03-19 19:00:00+00 ``` -The three _interval_ arithmetic results all differ from each other. in other words, the semantic effect of adding the "same" _interval_ value to the same _timestamptz_ value is different for each of the three nominally interchangeable spellings, _'720 hours'_, _'30 days'_, or _'1 month'_, of the _interval_ value. +The three _interval_ arithmetic results all differ from each other. in other words, the semantic effect of adding the "same" _interval_ value to the same _timestamptz_ value is different for each of the three nominally interchangeable spellings, _'720 hours'_, _'30 days'_, or _'1 month'_, of the _interval_ value. Now re-execute the prepared statement after setting the session's timezone to one that does _not_ respect Daylight savings Time. @@ -124,7 +124,7 @@ execute inspect_result; This is the new result: ```output - t0 | t0 + 720 hours | t0 + 30 days | t0 + 1 month + t0 | t0 + 720 hours | t0 + 30 days | t0 + 1 month ------------------------+------------------------+------------------------+------------------------ 2021-02-19 20:00:00+00 | 2021-03-21 20:00:00+00 | 2021-03-21 20:00:00+00 | 2021-03-19 20:00:00+00 ``` @@ -153,7 +153,7 @@ select This is the result: ```output - '720 hours' | '30 days' | '1 month' + '720 hours' | '30 days' | '1 month' ---------------+-----------+----------- (0,0,2592000) | (0,30,0) | (1,0,0) ``` diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-representation/_index.md b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-representation/_index.md index 2b58958e067c..1b78e1f253ac 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-representation/_index.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-representation/_index.md @@ -14,7 +14,7 @@ showAsideToc: true --- {{< tip title="Download and install the date-time utilities code." >}} -The code on this page and on its child, [Modeling the internal representation and comparing the model with the actual implementation](./internal-representation-model/), depends on the code presented in the section [User-defined _interval_ utility functions](../interval-utilities/). This is included in the larger [code kit](../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../type_datetime)_ section describes and uses. +The code on this page and on its child, [Modeling the internal representation and comparing the model with the actual implementation](./internal-representation-model/), depends on the code presented in the section [User-defined _interval_ utility functions](../interval-utilities/). This is included in the larger [code kit](../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../type_datetime/)_ section describes and uses. {{< /tip >}} The PostgreSQL documentation, under the table [Interval Input](https://www.postgresql.org/docs/11/datatype-datetime.html#DATATYPE-INTERVAL-INPUT-EXAMPLES), says this: @@ -108,5 +108,5 @@ The section [Interval arithmetic](../interval-arithmetic/) explains that the sem {{< tip title="Heads up." >}} There has been some discussion on the [pgsql-general](mailto:pgsql-general@lists.postgresql.org) and [pgsql-hackers](mailto:pgsql-hackers@lists.postgresql.org) mail lists about the algorithm whose implementation that the function _interval()_ documents. As a result, a patch has been developed for a future version of the PostgreSQL system that makes some subtle changes to the "spill-down" behavior in response to real number input values for _years_, _months_, _days_, _hours_, and _minutes_ when you use the _::interval_ typecast approach to construct an _interval_ value. When YugabyteDB adopts this patch, the implementation of the function [interval_mm_dd_ss (interval_parameterization_t)](./internal-representation-model/#function-interval-mm-dd-ss-interval-parameterization-t-returns-interval-mm-dd-ss-t) will be changed accordingly. -If you follow Yugabyte's recommendation to construct _interval_ values using only integral values for _years_, _months_, _days_, _hours_, and _minutes_ (or, equivalently, always to use the _make_interval()_ SQL built-in function rather than the _::interval_ typecast approach), then your application code will not see a behavior change when you move to a version of YugabyteDB that implements this patch. As mentioned above, the section [Custom domain types for specializing the native _interval_ functionality](../custom-interval-domains/) shows how to impose this discipline programmatically. +If you follow Yugabyte's recommendation to construct _interval_ values using only integral values for _years_, _months_, _days_, _hours_, and _minutes_ (or, equivalently, always to use the _make_interval()_ SQL built-in function rather than the _::interval_ typecast approach), then your application code will not see a behavior change when you move to a version of YugabyteDB that implements this patch. As mentioned above, the section [Custom domain types for specializing the native _interval_ functionality](../custom-interval-domains/) shows how to impose this discipline programmatically. {{< /tip >}} diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-representation/internal-representation-model.md b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-representation/internal-representation-model.md index c0cdddb33cca..5fe899ef9abd 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-representation/internal-representation-model.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-representation/internal-representation-model.md @@ -13,7 +13,7 @@ showAsideToc: true --- {{< tip title="Download and install the date-time utilities code." >}} -The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../../interval-utilities/). This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime)_ section describes and uses. +The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../../interval-utilities/). This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime/)_ section describes and uses. {{< /tip >}} Each of the [ad hoc examples](../ad-hoc-examples/) creates an _interval_ value by specifying any subset of its parameterization using _years_, _months_, _days_, _hours_, _minutes_, and _seconds_ from at least one of these through at most all six of them. (Omitting any of these six has the same effect as specifying _zero_ for that parameter.) diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-utilities.md b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-utilities.md index 412df5f23e24..5f22534201b1 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-utilities.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/interval-utilities.md @@ -48,7 +48,7 @@ The code presented on this page defines two user-defined types, _interval_parame The code that the remainder of this section presents defines the _interval_parameterization_t_ and _interval_mm_dd_ss_t_ types, and all but one of the six mutual transformation functions. The design of the five functions that are shown here is straightforward—but it does depend on knowing that the internal representation of an _interval_ value is a _[\[mm, dd, ss\]](../interval-representation/)_ tuple that uses four-byte integers to record the _months_ and _days_ fields and an eight-byte integer to record the _seconds_ field as a microseconds value. -The section [Modeling the internal representation and comparing the model with the actual implementation](../interval-representation/internal-representation-model/) defines and tests the function that the present page doesn't show: _function interval_mm_dd_ss(interval_parameterization_t)_. It implements, using PL/pgSQL, the rather complex algorithm that PostgreSQL, and therefore YSQL, use in their C code to transform a value, presented as a _text_ literal, to the internal _interval_ representation. +The section [Modeling the internal representation and comparing the model with the actual implementation](../interval-representation/internal-representation-model/) defines and tests the function that the present page doesn't show: _function interval_mm_dd_ss(interval_parameterization_t)_. It implements, using PL/pgSQL, the rather complex algorithm that PostgreSQL, and therefore YSQL, use in their C code to transform a value, presented as a _text_ literal, to the internal _interval_ representation. Here's an example of such a _text_ literal: @@ -67,7 +67,7 @@ Here's an example of such a _text_ literal: PostgreSQL defines two fundamentally different data type families for representing real numbers and for supporting arithmetic using their values. Of course, YSQL inherits this regime. -The PostgreSQL documentation uses the terms [Arbitrary Precision Numbers](https://www.postgresql.org/docs/11/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL) and [Floating-Point Numbers](https://www.postgresql.org/docs/11/datatype-numeric.html#DATATYPE-FLOAT) for these two kinds of data type. The first kind is exemplified by the data type _numeric_. And the second kind is exemplified by _double precision_. There are other variants in each class. But the entire _[date_time](../../../type_datetime/)_ section uses only these two (and uses only the unconstraint _numeric_ variant). Moreover, it uses _numeric_ only under duress. For example, you can easily round a _numeric_ value to some desired number of decimal places like this: +The PostgreSQL documentation uses the terms [Arbitrary Precision Numbers](https://www.postgresql.org/docs/11/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL) and [Floating-Point Numbers](https://www.postgresql.org/docs/11/datatype-numeric.html#DATATYPE-FLOAT) for these two kinds of data type. The first kind is exemplified by the data type _numeric_. And the second kind is exemplified by _double precision_. There are other variants in each class. But the entire _[date_time](../../../../type_datetime/)_ section uses only these two (and uses only the unconstraint _numeric_ variant). Moreover, it uses _numeric_ only under duress. For example, you can easily round a _numeric_ value to some desired number of decimal places like this: ```plpgsql select round(12.3456789::numeric, 3::int); @@ -125,7 +125,7 @@ In the context of the _date-time_ data types, _double precision_ values always r ```plpgsql drop function if exists approx_equals(double precision, double precision) cascade; -create function approx_equals(v1 in double precision, v2 in double precision) +create function approx_equals(v1 in double precision, v2 in double precision) returns boolean language plpgsql as $body$ @@ -173,7 +173,7 @@ from c3; This is the result: ```output - orig | recovered | native_equals | approx_equals + orig | recovered | native_equals | approx_equals --------------------+--------------------+---------------+--------------- 234.567000000000 | 234.567000000000 | false | true ``` @@ -188,15 +188,15 @@ When you define an _interval_ value using either the _::interval_ typecast of a ```plpgsql select - '5 years 4 months' ::interval as i1, - '40 days' ::interval as i2, + '5 years 4 months' ::interval as i1, + '40 days' ::interval as i2, '9 hours 30 minutes 45 seconds' ::interval as i3; ``` This is the result: ```output - i1 | i2 | i3 + i1 | i2 | i3 ----------------+---------+---------- 5 years 4 mons | 40 days | 09:30:45 ``` @@ -205,8 +205,8 @@ And try this, using the _make_interval()_ approach: ```plpgsql select - make_interval(years=>5, months=>4) as i1, - make_interval(days=>40) as i2, + make_interval(years=>5, months=>4) as i1, + make_interval(days=>40) as i2, make_interval(hours=>9, mins=>30, secs=>45) as i3; ``` @@ -274,7 +274,7 @@ select interval_parameterization(yy=>5, mm=>6)::text; This is the result: ```output - interval_parameterization + interval_parameterization --------------------------- (5,6,0,0,0,0) ``` @@ -297,7 +297,7 @@ declare hh constant interval not null := p.hh::text ||' hours'; mi constant interval not null := p.mi::text ||' minutes'; ss constant interval not null := p.ss::text ||' seconds'; -begin +begin return yy + mm + dd + hh + mi + ss; end; $body$; @@ -314,7 +314,7 @@ select interval_value(interval_parameterization(mm=>2.345, dd=>3.456))::text; This is the result: ```output - interval_value + interval_value --------------------------- 2 mons 13 days 19:20:38.4 ``` @@ -353,7 +353,7 @@ select parameterization('2 months 13 days 19:20:38.4'::interval)::text; This is the result: ```output - parameterization + parameterization -------------------------------------- (0,2,13,19,20,38.4) ``` @@ -505,7 +505,7 @@ create function interval_value(i in interval_mm_dd_ss_t) returns interval language plpgsql as $body$ -begin +begin return make_interval(months=>i.mm, days=>i.dd, secs=>i.ss); end; $body$; @@ -536,7 +536,7 @@ select extract(hours from '123 months 234 days 34567.123456 seconds'::interval) This is the result: ```output - extracted hours + extracted hours ----------------- 9 ``` @@ -650,7 +650,7 @@ Yugabyte staff members have carefully considered the practical value of the nati They believe that the use-cases where the functionality will be useful are rare—and that, rather, a "strict equals" notion, that requires pairwise equality of the individual fields of the [_\[mm, dd, ss\]_ internal representations](../interval-representation/) of the _interval_ values that are compared, will generally be more valuable. {{< /tip >}} -See the section [Comparing two _interval_ values](../interval-arithmetic/interval-interval-comparison/) for the larger discussion on this topic. +See the section [Comparing two _interval_ values](../interval-arithmetic/interval-interval-comparison/) for the larger discussion on this topic. Create the _strict_equals()_ function thus: @@ -900,7 +900,7 @@ select This is the result: ```output - all the same + all the same -------------- true ``` diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/justfy-and-extract-epoch.md b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/justfy-and-extract-epoch.md index 5cd5f0e9cd1a..8992107f4223 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/justfy-and-extract-epoch.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/date-time-data-types-semantics/type-interval/justfy-and-extract-epoch.md @@ -13,7 +13,7 @@ showAsideToc: true --- {{< tip title="Download and install the date-time utilities code." >}} -The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../interval-utilities/). This is included in the larger [code kit](../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../type_datetime)_ section describes and uses. +The code on this page depends on the code presented in the section [User-defined _interval_ utility functions](../interval-utilities/). This is included in the larger [code kit](../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../type_datetime/)_ section describes and uses. {{< /tip >}} ## The justify_hours(), justify_days(), and justify_interval() built-in functions diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/functions/_index.md b/docs/content/latest/api/ysql/datatypes/type_datetime/functions/_index.md index ecaee28bab3e..3f931fbc1ca5 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/functions/_index.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/functions/_index.md @@ -136,7 +136,7 @@ For this reason, this section won't say any more about the _timeofday()_ builtin | [pg_sleep_for()](./delaying-execution#function-pg-sleep-for-returns-void) | void | | [pg_sleep_until()](./delaying-execution#function-pg-sleep-until-returns-void) | void | -## [Miscellaneous functions](./miscellaneous) +## [Miscellaneous functions](./miscellaneous/) | | **return data type** | | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/operators/_index.md b/docs/content/latest/api/ysql/datatypes/type_datetime/operators/_index.md index b6e49e1fac60..2fe334387c8d 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/operators/_index.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/operators/_index.md @@ -13,7 +13,7 @@ isTocNested: true showAsideToc: true --- -Each of the comparison operators, `<`, `<=`, `=`, `>=`, `>`, and `<>`, each of the arithmetic operators, `+`, `-`, `*`, and `/`, and, of course, the `::` typecast operator has one or several overloads whose two operands are among the _date_, _time_, plain _timestamp_, _timestamptz_, and _interval_ data types. The [parent section](../../type_datetime) explains why _timetz_ is not covered in this overall _date-time_ section. This is why there are _five_ interesting _date-time_ data types. +Each of the comparison operators, `<`, `<=`, `=`, `>=`, `>`, and `<>`, each of the arithmetic operators, `+`, `-`, `*`, and `/`, and, of course, the `::` typecast operator has one or several overloads whose two operands are among the _date_, _time_, plain _timestamp_, _timestamptz_, and _interval_ data types. The [parent section](../../type_datetime/) explains why _timetz_ is not covered in this overall _date-time_ section. This is why there are _five_ interesting _date-time_ data types. The section [Typecasting between values of different date-time datatypes](../typecasting-between-date-time-values/) shows which of the twenty potential typecasts between pairs of _different_ interesting date-time data types are legal. (It's meaningless to think about typecasting between a pair of values of the _same_ data type.) And for each of those _ten_ that is legal, the section describes its semantics. Further, the typecast operator, `::`, has an overload from/to each of the five listed interesting _date-time_ data types to/from _text_. In other words, there are _ten_ typecasts from/to the interesting _date-time_ data types to/from _text_. The section [Typecasting between date-time values and text values](../typecasting-between-date-time-and-text/) describes these. @@ -73,7 +73,7 @@ from c; It runs without error and produces these two values: ```output - ts > t | tstz > t + ts > t | tstz > t --------+---------- false | true ``` @@ -125,7 +125,7 @@ select This is the result: ```output - data type | result + data type | result -----------+-------- integer | 5 ``` @@ -141,7 +141,7 @@ select This is the result: ```output - data type | result + data type | result -----------+------------ date | 2020-01-06 ``` diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-addition-overloads.md b/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-addition-overloads.md index 2554d682f82f..1961c5b7c7f9 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-addition-overloads.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-addition-overloads.md @@ -12,7 +12,7 @@ isTocNested: true showAsideToc: true --- -The [start page](../../../type_datetime) of the overall _date-time_ section explains why _timetz_ is not covered. So there are five _date-time_ data types to consider here and therefore twenty-five overloads to test. The following code implements all of the tests. The design of the code (it tests the legal additions and the illegal additions separately) was informed by _ad hoc_ tests during its development. +The [start page](../../../type_datetime/) of the overall _date-time_ section explains why _timetz_ is not covered. So there are five _date-time_ data types to consider here and therefore twenty-five overloads to test. The following code implements all of the tests. The design of the code (it tests the legal additions and the illegal additions separately) was informed by _ad hoc_ tests during its development. Try this: @@ -194,18 +194,18 @@ This is the result: ```output date-time: timestamp without time zone date-interval: timestamp without time zone - + time-date: timestamp without time zone time-ts: timestamp without time zone time-tstz: timestamp with time zone time-interval: time without time zone - + ts-time: timestamp without time zone ts-interval: timestamp without time zone - + tstz-time: timestamp with time zone tstz-interval: timestamp with time zone - + interval-date: timestamp without time zone interval-time: time without time zone interval-ts: timestamp without time zone diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-comparison-overloads.md b/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-comparison-overloads.md index 873a79520f6b..d59b72b12466 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-comparison-overloads.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-comparison-overloads.md @@ -26,7 +26,7 @@ data_type_2_value A data_type_1_value The fact that one is legal does not imply that the other is. The legality of each is informed by its own mental model; and each requires its own test. -The [start page](../../../type_datetime) of the overall _date-time_ section explains why _timetz_ is not covered. So there are five _date-time_ data types to consider here and therefore twenty-five overloads to test. (You can't assume that you can always compare values of the same data type. For example, if the data type represents the latitude and longitude of a location, then you can't ask which location is greater than the other.) +The [start page](../../../type_datetime/) of the overall _date-time_ section explains why _timetz_ is not covered. So there are five _date-time_ data types to consider here and therefore twenty-five overloads to test. (You can't assume that you can always compare values of the same data type. For example, if the data type represents the latitude and longitude of a location, then you can't ask which location is greater than the other.) The following code implements all of the tests. The design of the code (it tests the legal comparisons and the illegal comparisons separately) was informed by _ad hoc_ tests during its development. diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-subtraction-overloads.md b/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-subtraction-overloads.md index f6671438d335..c5a1faaf83a4 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-subtraction-overloads.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/operators/test-date-time-subtraction-overloads.md @@ -12,7 +12,7 @@ isTocNested: true showAsideToc: true --- -The [start page](../../../type_datetime) of the overall _date-time_ section explains why _timetz_ is not covered. So there are five _date-time_ data types to consider here and therefore twenty-five overloads to test. The following code implements all of the tests. The design of the code (it tests the legal subtractions and the illegal subtractions separately) was informed by _ad hoc_ tests during its development. +The [start page](../../../type_datetime/) of the overall _date-time_ section explains why _timetz_ is not covered. So there are five _date-time_ data types to consider here and therefore twenty-five overloads to test. The following code implements all of the tests. The design of the code (it tests the legal subtractions and the illegal subtractions separately) was informed by _ad hoc_ tests during its development. Try this: @@ -195,22 +195,22 @@ This is the result: date-ts: interval date-tstz: interval date-interval: timestamp without time zone - + time-time: interval time-interval: time without time zone - + ts-date: interval ts-time: timestamp without time zone ts-ts: interval ts-tstz: interval ts-interval: timestamp without time zone - + tstz-date: interval tstz-time: timestamp with time zone tstz-ts: interval tstz-tstz: interval tstz-interval: timestamp with time zone - + interval-time: interval interval-interval: interval ``` diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/timezones/recommendation.md b/docs/content/latest/api/ysql/datatypes/type_datetime/timezones/recommendation.md index 802ada4a3fa4..d8371debbdc6 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/timezones/recommendation.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/timezones/recommendation.md @@ -30,7 +30,7 @@ Following these recommendations protects you from the many opportunities to go w {{< tip title="Download and install the date-time utilities code." >}} The code on this page depends on the [_extended_timezone_names_ view](../extended-timezone-names/). It also depends on the [custom _interval_ domains](../../date-time-data-types-semantics/type-interval/custom-interval-domains/) code. And this, in turn, depends on the [user-defined _interval_ utilities](../../date-time-data-types-semantics/type-interval/interval-utilities/). -These components are all included in the larger [code kit](../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../type_datetime)_ section describes and uses. +These components are all included in the larger [code kit](../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../type_datetime/)_ section describes and uses. The code on that this page defines is intended for reuse. It, too, is therefore included in the _date-time utilities_ downloadable code kit. {{< /tip >}} @@ -307,13 +307,13 @@ begin declare msg constant text not null := tz_in||' assert failed'; begin - assert tz_out = tz_in, msg; + assert tz_out = tz_in, msg; end; end loop; begin call set_timezone('Bad'); - assert false, 'Logic error'; + assert false, 'Logic error'; exception when invalid_parameter_value then declare msg text not null := ''; @@ -359,7 +359,7 @@ begin begin call set_timezone(make_interval(hours=>19)); - assert false, 'Logic error'; + assert false, 'Logic error'; exception when invalid_parameter_value then declare msg text not null := ''; @@ -411,7 +411,7 @@ begin declare msg constant text not null := tz||' assert failed'; begin - assert tz_result = tz_expected, msg; + assert tz_result = tz_expected, msg; end; end loop; end; @@ -449,7 +449,7 @@ begin declare msg constant text not null := i::text||' assert failed'; begin - assert tz_result = tz_expected, msg; + assert tz_result = tz_expected, msg; end; end loop; end; diff --git a/docs/content/latest/api/ysql/datatypes/type_datetime/timezones/ways-to-spec-offset/name-res-rules/rule-4.md b/docs/content/latest/api/ysql/datatypes/type_datetime/timezones/ways-to-spec-offset/name-res-rules/rule-4.md index 55754f128bf6..6eec0854b603 100644 --- a/docs/content/latest/api/ysql/datatypes/type_datetime/timezones/ways-to-spec-offset/name-res-rules/rule-4.md +++ b/docs/content/latest/api/ysql/datatypes/type_datetime/timezones/ways-to-spec-offset/name-res-rules/rule-4.md @@ -19,7 +19,7 @@ This applies only in those syntax contexts where _pg_timezone_abbrevs.abbrev_ is {{< /tip >}}
    {{< tip title="Download and install the date-time utilities code." >}} -The code on this page depends on the code presented in the [_extended_timezone_names_ view](../../../extended-timezone-names/) section. This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime)_ section describes and uses. +The code on this page depends on the code presented in the [_extended_timezone_names_ view](../../../extended-timezone-names/) section. This is included in the larger [code kit](../../../../download-date-time-utilities/) that includes all of the reusable code that the overall _[date-time](../../../../../type_datetime/)_ section describes and uses. {{< /tip >}} The page for [Rule 3](../rule-3) tested with a string that's found uniquely in _pg_timezone_abbrevs.abbrev_. It established that for the second two syntax contexts (the _at time zone_ operator and the _text_ literal for a _timestamptz_ value), the string _is_ looked up in this column; and that for the first syntax context (the _set timezone_ statement) this column is _not_ searched. @@ -40,7 +40,7 @@ from c; This is the result: ```output - ~names.name | ~names.abbrev | ~abbrevs.abbrev + ~names.name | ~names.abbrev | ~abbrevs.abbrev -------------+---------------+----------------- true | false | false ``` @@ -81,7 +81,7 @@ from c; This is the result: ```output - ~names.name | ~names.abbrev | ~abbrevs.abbrev + ~names.name | ~names.abbrev | ~abbrevs.abbrev -------------+---------------+----------------- true | false | true ``` @@ -107,7 +107,7 @@ Predictably, this is the result: The [PostgresSQL documentation](https://www.postgresql.org/docs/11/) does not provide the answer. But the question can be answered empirically if _MET_ (or another such string that occurs in both columns) maps to different _UTC_offset_ values in the two different columns. Try this: ```plpgsql -with +with met_names_offsets(string, names_offset, is_dst) as ( select name, utc_offset, is_dst from pg_timezone_names @@ -125,7 +125,7 @@ possibly_disagreeing_offsets(string, names_offset, is_dst, abbrevs_offset) as ( inner join met_abbrevs_offset as a using(string)) - + select string, names_offset, is_dst::text, abbrevs_offset from possibly_disagreeing_offsets; ``` @@ -133,12 +133,12 @@ from possibly_disagreeing_offsets; This is the result: ```output - string | names_offset | is_dst | abbrevs_offset + string | names_offset | is_dst | abbrevs_offset --------+--------------+--------+---------------- MET | 02:00:00 | true | 01:00:00 ``` -Of course, there is just one row because both _pg_timezone_names.name_ and _pg_timezone_abbrevs.abbrev_ have unique values. You can see that the query happens to have been executed during the Day Light Savings Time period for the timezone _MET_. This is fortunate for the usefulness of the test that follows. Look up _MET_ in the [_extended_timezone_names_](../../../extended-timezone-names/) view. +Of course, there is just one row because both _pg_timezone_names.name_ and _pg_timezone_abbrevs.abbrev_ have unique values. You can see that the query happens to have been executed during the Day Light Savings Time period for the timezone _MET_. This is fortunate for the usefulness of the test that follows. Look up _MET_ in the [_extended_timezone_names_](../../../extended-timezone-names/) view. ```plpgsql select name, std_abbrev, dst_abbrev, std_offset, dst_offset @@ -149,7 +149,7 @@ where name = 'MET'; This is the result: ```output - name | std_abbrev | dst_abbrev | std_offset | dst_offset + name | std_abbrev | dst_abbrev | std_offset | dst_offset ------+------------+------------+------------+------------ MET | MET | MEST | 01:00:00 | 02:00:00 ``` @@ -209,7 +209,7 @@ order by string; This is the result: ```outout - string | std_abbrev | dst_abbrev | std offset from ~names | dst offset from ~names | offset from ~abbrevs + string | std_abbrev | dst_abbrev | std offset from ~names | dst offset from ~names | offset from ~abbrevs --------+------------+------------+------------------------+------------------------+---------------------- CET | CET | CEST | 01:00:00 | 02:00:00 | 01:00:00 EET | EET | EEST | 02:00:00 | 03:00:00 | 02:00:00 diff --git a/docs/content/latest/api/ysql/exprs/window_functions/function-syntax-semantics/_index.md b/docs/content/latest/api/ysql/exprs/window_functions/function-syntax-semantics/_index.md index db9545deb46f..98342ea0ba25 100644 --- a/docs/content/latest/api/ysql/exprs/window_functions/function-syntax-semantics/_index.md +++ b/docs/content/latest/api/ysql/exprs/window_functions/function-syntax-semantics/_index.md @@ -38,7 +38,7 @@ This property is marked by _"Y"_ in the column _"agg?"_ in the following tables; {{< note title="Functions with both a 'window' and an 'aggregate' variant" >}} -The definitive description of the use, as an aggregate function, of a window function that has such a variant, is described within the [Aggregate functions](../../aggregate_functions) major section in the section [Within-group hypothetical-set aggregate functions +The definitive description of the use, as an aggregate function, of a window function that has such a variant, is described within the [Aggregate functions](../../aggregate_functions/) major section in the section [Within-group hypothetical-set aggregate functions ](../../aggregate_functions/function-syntax-semantics/rank-dense-rank-percent-rank-cume-dist/). {{< /note >}} diff --git a/docs/content/latest/api/ysql/exprs/window_functions/invocation-syntax-semantics.md b/docs/content/latest/api/ysql/exprs/window_functions/invocation-syntax-semantics.md index 02218591670e..85d6df0f7dbb 100644 --- a/docs/content/latest/api/ysql/exprs/window_functions/invocation-syntax-semantics.md +++ b/docs/content/latest/api/ysql/exprs/window_functions/invocation-syntax-semantics.md @@ -23,7 +23,7 @@ Notice these three different orthography styles: - `OVER` is a keyword that names a clause. You write such a keyword in a SQL statement. -- [`window_definition`](../../../syntax_resources/grammar_diagrams/#window-definition) is the name of a rule within the overall SQL grammar. You never type such a name in a SQL statement. It is written in bold lower case with underscores, as appropriate, between the English words. Because such a rule is always shown as a link, you can jump directly to the rule in the [Grammar Diagrams](../../../syntax_resources/grammar_diagrams/#abort) page. This page shows every single one of the SQL rules. It so happens that the [`window_definition`](../../../syntax_resources/grammar_diagrams/#window-definition) rule starts with the keyword `WINDOW` and might therefore, according to the context of use, be referred to alternatively as the `WINDOW` clause. +- [`window_definition`](../../../syntax_resources/grammar_diagrams/#window-definition) is the name of a rule within the overall SQL grammar. You never type such a name in a SQL statement. It is written in bold lower case with underscores, as appropriate, between the English words. Because such a rule is always shown as a link, you can jump directly to the rule in the [Grammar Diagrams](../../../syntax_resources/grammar_diagrams/#abort) page. This page shows every single one of the SQL rules. It so happens that the [`window_definition`](../../../syntax_resources/grammar_diagrams/#window-definition) rule starts with the keyword `WINDOW` and might therefore, according to the context of use, be referred to alternatively as the `WINDOW` clause. - [_window frame_](./#frame-clause-semantics-for-window-functions) is a pure term of art. It is written in italic lower case with spaces, as appropriate, between the English words. You neither write it in a SQL statement nor use it to look up anything in the [Grammar Diagrams](../../../syntax_resources/grammar_diagrams/#abort) page. Because such a term of art is always shown as a link, you can jump directly to its definition within this _"Window function invocation—SQL syntax and semantics"_ page. @@ -182,12 +182,12 @@ The [`frame_clause`](../../../syntax_resources/grammar_diagrams/#frame-clause) s - The functions in the first group, [Window functions that return an "int" or "double precision" value as a "classifier" of the rank of the row within its window](../function-syntax-semantics/#window-functions-that-return-an-int-or-double-precision-value-as-a-classifier-of-the-rank-of-the-row-within-its-window), are not sensitive to what the [`frame_clause`](../../../syntax_resources/grammar_diagrams/#frame-clause) specifies and always use all of the rows in the current [_window_](./#the-window-definition-rule). Yugabyte recommends that you therefore omit the [`frame_clause`](../../../syntax_resources/grammar_diagrams/#frame-clause) in the `OVER` clause that you use to invoke these functions. - The functions in the second group, [Window functions that return columns of another row within the window](../function-syntax-semantics/#window-functions-that-return-column-s-of-another-row-within-the-window), make obvious sense when the scope within which the specified row is found is the entire [_window_](./#the-window-definition-rule). If you have one of the very rare use cases where the output that you want is produced by a different [`frame_clause`](../../../syntax_resources/grammar_diagrams/#frame-clause), then specify what you want explicitly. Otherwise, because it isn't the default, you must specify that the [_window frame_](./#frame-clause-semantics-for-window-functions) includes the entire current [_window_](./#the-window-definition-rule) like this: - + ``` range between unbounded preceding and unbounded following ``` -Use cases where the [`frame_clause`](../../../syntax_resources/grammar_diagrams/#frame-clause)'s many other variants are useful arise when an aggregate function is invoked using the `OVER` clause. One example is given in the section [Using the aggregate function `avg()` to compute a moving average](../#using-the-aggregate-function-avg-to-compute-a-moving-average). Another example, that uses `count(*)`, is given in the code that explains the meaning of the [`percent_rank()`](../function-syntax-semantics/percent-rank-cume-dist-ntile/#percent-rank) function. Otherwise, see the main [Aggregate functions](../../aggregate_functions) section. +Use cases where the [`frame_clause`](../../../syntax_resources/grammar_diagrams/#frame-clause)'s many other variants are useful arise when an aggregate function is invoked using the `OVER` clause. One example is given in the section [Using the aggregate function `avg()` to compute a moving average](../#using-the-aggregate-function-avg-to-compute-a-moving-average). Another example, that uses `count(*)`, is given in the code that explains the meaning of the [`percent_rank()`](../function-syntax-semantics/percent-rank-cume-dist-ntile/#percent-rank) function. Otherwise, see the main [Aggregate functions](../../aggregate_functions/) section. #### frame_clause semantics for aggregate functions diff --git a/docs/content/latest/api/ysql/the-sql-language/_index.md b/docs/content/latest/api/ysql/the-sql-language/_index.md index 1b34a07a4266..bcac3e19f653 100644 --- a/docs/content/latest/api/ysql/the-sql-language/_index.md +++ b/docs/content/latest/api/ysql/the-sql-language/_index.md @@ -51,6 +51,6 @@ Statements in this class support the preparation of SQL statements, and their su In the performance control class, the [`EXPLAIN`](./statements/perf_explain/) statement shows what access methods a DML statement will use and (for statements with joins) the join order and method. -## The WITH clause: [here](./with-clause) +## The WITH clause: [here](./with-clause/) The `WITH` clause (sometimes known as the _common table expression_) can be used as part of a `SELECT` statement, an `INSERT` statement, an `UPDATE` statement, or a `DELETE` statement. For this reason, the functionality is described in a dedicated section. \ No newline at end of file diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/_index.md b/docs/content/latest/api/ysql/the-sql-language/statements/_index.md index 628d168d3a42..68aa9450e953 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/_index.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/_index.md @@ -2,7 +2,7 @@ title: SQL statements [YSQL] headerTitle: Categorized list of SQL statements linkTitle: SQL statements -description: List of PostgreSQL-compatible SQL statements supported by Yugabyte SQL (YSQL) +description: List of PostgreSQL-compatible SQL statements supported by Yugabyte SQL (YSQL) image: /images/section_icons/api/ysql.png menu: latest: @@ -17,7 +17,7 @@ showAsideToc: true The YSQL statements are compatible with the SQL dialect that PostgreSQL supports. The sidebar lists all of the YSQL statements in alphabetical order. The following tables list them by catagory. -## Data definition language (DDL) +## Data definition language (DDL) | Statement | Description | | :-------- | :---------- | @@ -32,7 +32,7 @@ The YSQL statements are compatible with the SQL dialect that PostgreSQL supports | [`CREATE DOMAIN`](ddl_create_domain) | Create a user-defined data type with optional constraints | | [`CREATE EXTENSION`](ddl_create_extension) | Load an extension | | [`CREATE FUNCTION`](ddl_create_function) | Create a function | -| [`CREATE INDEX`](ddl_create_index) | Create an index | +| [`CREATE INDEX`](ddl_create_index/) | Create an index | | [`CREATE MATERIALIZED VIEW`](ddl_create_matview) | Create a materialized view | | [`CREATE OPERATOR`](ddl_create_operator) | Create an operator | | [`CREATE OPERATOR CLASS`](ddl_create_operator_class) | Create an operator class | @@ -63,16 +63,16 @@ The YSQL statements are compatible with the SQL dialect that PostgreSQL supports | [`REFRESH MATERIALIZED VIEW`](ddl_refresh_matview) | Refresh a materialized view | | [`TRUNCATE`](ddl_truncate) | Clear all rows from a table | -## Data manipulation language (DML) +## Data manipulation language (DML) | Statement | Description | | :-------- | :---------- | -| [`DELETE`](dml_delete) | Delete rows from a table | +| [`DELETE`](dml_delete/) | Delete rows from a table | | [`INSERT`](dml_insert) | Insert rows into a table | -| [`SELECT`](dml_select) | Select rows from a table | -| [`UPDATE`](dml_update) | Update rows in a table | +| [`SELECT`](dml_select/) | Select rows from a table | +| [`UPDATE`](dml_update/) | Update rows in a table | -## Data control language (DCL) +## Data control language (DCL) | Statement | Description | | :-------- | :---------- | @@ -96,12 +96,12 @@ The YSQL statements are compatible with the SQL dialect that PostgreSQL supports | [`SET ROLE`](dcl_set_role) | Set a role | | [`SET SESSION AUTHORIZATION`](dcl_set_session_authorization) | Set session authorization | -## Transaction control language (TCL) +## Transaction control language (TCL) | Statement | Description | | :-------- | :---------- | | [`ABORT`](txn_abort) | Roll back a transaction | -| [`BEGIN`](txn_begin) | Start a transaction | +| [`BEGIN`](txn_begin/) | Start a transaction | | [`COMMIT`](txn_commit) | Commit a transaction | | [`END`](txn_end) | Commit a transaction | | [`LOCK`](txn_lock) | Lock a table | diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_schema.md b/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_schema.md index 8c6b312f60be..cc13b1f900be 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_schema.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_schema.md @@ -52,7 +52,7 @@ Where - `role_name` is the role who will own the new schema. If omitted, it defaults to the user executing the command. To create a schema owned by another role, you must be a direct or indirect member of that role, or be a superuser. - `schema_element` is a YSQL statement defining an object to be created within the schema. -Currently, only [`CREATE TABLE`](../ddl_create_table), [`CREATE VIEW`](../ddl_create_view), [`CREATE INDEX`](../ddl_create_index), [`CREATE SEQUENCE`](../ddl_create_sequence), [`CREATE TRIGGER`](../ddl_create_trigger) and [`GRANT`](../dcl_grant) are supported as clauses within `CREATE SCHEMA`. +Currently, only [`CREATE TABLE`](../ddl_create_table), [`CREATE VIEW`](../ddl_create_view), [`CREATE INDEX`](../ddl_create_index/), [`CREATE SEQUENCE`](../ddl_create_sequence), [`CREATE TRIGGER`](../ddl_create_trigger) and [`GRANT`](../dcl_grant) are supported as clauses within `CREATE SCHEMA`. Other kinds of objects may be created in separate commands after the schema is created. ## Examples @@ -91,6 +91,6 @@ yugabyte=# CREATE SCHEMA branch - [`CREATE TABLE`](../ddl_create_table) - [`CREATE VIEW`](../ddl_create_view) -- [`CREATE INDEX`](../ddl_create_index) +- [`CREATE INDEX`](../ddl_create_index/) - [`CREATE SEQUENCE`](../ddl_create_sequence) - [`GRANT`](../dcl_grant) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_trigger.md b/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_trigger.md index f031b8aebda8..8ee395831fe4 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_trigger.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_trigger.md @@ -45,7 +45,7 @@ Use the `CREATE TRIGGER` statement to create a trigger. ## Semantics -- the `WHEN` condition can be used to specify whether the trigger should be fired. For low-level triggers it can reference the old and/or new values of the row's columns. +- the `WHEN` condition can be used to specify whether the trigger should be fired. For low-level triggers it can reference the old and/or new values of the row's columns. - multiple triggers can be defined for the same event. In that case, they will be fired in alphabetical order by name. ## Examples @@ -131,5 +131,5 @@ Use the `CREATE TRIGGER` statement to create a trigger. - [`DROP TRIGGER`](../ddl_drop_trigger) - [`INSERT`](../dml_insert) -- [`UPDATE`](../dml_update) -- [`DELETE`](../dml_delete) +- [`UPDATE`](../dml_update/) +- [`DELETE`](../dml_delete/) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_view.md b/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_view.md index 7e0cb571723b..2e5518a2b979 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_view.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/ddl_create_view.md @@ -2,7 +2,7 @@ title: CREATE VIEW statement [YSQL] headerTitle: CREATE VIEW linkTitle: CREATE VIEW -description: Use the CREATE VIEW statement to create a view in a database. +description: Use the CREATE VIEW statement to create a view in a database. menu: latest: identifier: ddl_create_view @@ -15,7 +15,7 @@ showAsideToc: true ## Synopsis -Use the `CREATE VIEW` statement to create a view in a database. It defines the view name and the (select) statement defining it. +Use the `CREATE VIEW` statement to create a view in a database. It defines the view name and the (select) statement defining it. ## Syntax @@ -99,4 +99,4 @@ yugabyte=# SELECT * FROM sample_view; ## See also -- [`SELECT`](../dml_select) +- [`SELECT`](../dml_select/) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/ddl_drop_table.md b/docs/content/latest/api/ysql/the-sql-language/statements/ddl_drop_table.md index 3eb3a219ca8f..4589edbc4561 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/ddl_drop_table.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/ddl_drop_table.md @@ -115,7 +115,7 @@ The 'DROP' now succeeds and the `\d` metacommand shows that the table _"children - [`CREATE TABLE`](../ddl_create_table) - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) +- [`SELECT`](../dml_select/) ``` diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/ddl_drop_trigger.md b/docs/content/latest/api/ysql/the-sql-language/statements/ddl_drop_trigger.md index f8fb71b79d6c..5747680e1d12 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/ddl_drop_trigger.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/ddl_drop_trigger.md @@ -59,5 +59,5 @@ DROP TRIGGER update_moddatetime ON posts; - [`CREATE TRIGGER`](../ddl_create_trigger) - [`INSERT`](../dml_insert) -- [`UPDATE`](../dml_update) -- [`DELETE`](../dml_delete) +- [`UPDATE`](../dml_update/) +- [`DELETE`](../dml_delete/) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/dml_delete.md b/docs/content/latest/api/ysql/the-sql-language/statements/dml_delete.md index 2b645fdf9b4d..1a71e896d637 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/dml_delete.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/dml_delete.md @@ -55,7 +55,7 @@ See the section [The WITH clause and common table expressions](../../with-clause - While the `WHERE` clause allows a wide range of operators, the exact conditions used in the `WHERE` clause have significant performance considerations (especially for large datasets). For the best performance, use a `WHERE` clause that provides values for all columns in `PRIMARY KEY` or `INDEX KEY`. -### *delete* +### *delete* #### WITH [ RECURSIVE ] *with_query* [ , ... ] DELETE FROM [ ONLY ] *table_name* [ * ] [ [ AS ] *alias* ] [ WHERE *condition* | WHERE CURRENT OF *cursor_name* ] [ [*returning_clause*] (#returning-clause) ] @@ -127,5 +127,5 @@ DELETE 1 ## See also - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) -- [`UPDATE`](../dml_update) +- [`SELECT`](../dml_select/) +- [`UPDATE`](../dml_update/) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/dml_insert.md b/docs/content/latest/api/ysql/the-sql-language/statements/dml_insert.md index bbea70d0fcac..27304a3701ee 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/dml_insert.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/dml_insert.md @@ -47,7 +47,7 @@ See the section [The WITH clause and common table expressions](../../with-clause ## Semantics -Constraints must be satisfied. +Constraints must be satisfied. ### *insert* @@ -238,7 +238,7 @@ yugabyte=# SELECT id, c1, c2 FROM sample ORDER BY id; ``` ``` - id | c1 | c2 + id | c1 | c2 ----+--------+----------- 1 | cat | sparrow 2 | dog | blackbird @@ -334,4 +334,4 @@ yugabyte=# SELECT id, c1, c2 FROM sample ORDER BY c1; - [`COPY`](../cmd_copy) - [`CREATE TABLE`](../ddl_create_table) -- [`SELECT`](../dml_select) +- [`SELECT`](../dml_select/) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/dml_update.md b/docs/content/latest/api/ysql/the-sql-language/statements/dml_update.md index f9efd9dd4397..3649e7b5babd 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/dml_update.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/dml_update.md @@ -131,6 +131,6 @@ yugabyte=# SELECT * FROM sample ORDER BY k1; ## See also -- [`DELETE`](../dml_delete) +- [`DELETE`](../dml_delete/) - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) +- [`SELECT`](../dml_select/) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/perf_explain.md b/docs/content/latest/api/ysql/the-sql-language/statements/perf_explain.md index 8ba622e87333..d923d6732350 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/perf_explain.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/perf_explain.md @@ -45,7 +45,7 @@ Use the `EXPLAIN` statement to show the execution plan for an statement. If the ## Semantics -Where statement is the target statement (see more [here](../dml_select)). +Where statement is the target statement (see more [here](../dml_select/)). ### ANALYZE @@ -110,4 +110,4 @@ yugabyte=# EXPLAIN ANALYZE SELECT * FROM sample WHERE k1 = 2 and floor(k2 + 1.5) ## See also - [`INSERT`](../dml_insert) -- [`SELECT`](../dml_select) +- [`SELECT`](../dml_select/) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/txn_abort.md b/docs/content/latest/api/ysql/the-sql-language/statements/txn_abort.md index b232114ad030..87bf104b3db7 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/txn_abort.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/txn_abort.md @@ -68,7 +68,7 @@ yugabyte=# CREATE TABLE sample(k1 int, k2 int, v1 int, v2 text, PRIMARY KEY (k1, Begin a transaction and insert some rows. ```plpgsql -yugabyte=# BEGIN TRANSACTION; SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; +yugabyte=# BEGIN TRANSACTION; SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; ``` ```plpgsql @@ -155,6 +155,6 @@ yugabyte=# SELECT * FROM sample; -- run in second shell. ## See also -- [`BEGIN`](../txn_begin) +- [`BEGIN`](../txn_begin/) - [`COMMIT`](../txn_commit) - [`ROLLBACK`](../txn_rollback) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/txn_commit.md b/docs/content/latest/api/ysql/the-sql-language/statements/txn_commit.md index c15f1974095a..c8aa35870760 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/txn_commit.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/txn_commit.md @@ -70,7 +70,7 @@ CREATE TABLE sample(k1 int, k2 int, v1 int, v2 text, PRIMARY KEY (k1, k2)); Begin a transaction and insert some rows. ```plpgsql -BEGIN TRANSACTION; SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; +BEGIN TRANSACTION; SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; ``` ```plpgsql @@ -80,7 +80,7 @@ INSERT INTO sample(k1, k2, v1, v2) VALUES (1, 2.0, 3, 'a'), (1, 3.0, 4, 'b'); Start a new shell with `ysqlsh` and begin another transaction to insert some more rows. ```plpgsql -yugabyte=# BEGIN TRANSACTION; SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; +yugabyte=# BEGIN TRANSACTION; SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; ``` ```plpgsql @@ -156,5 +156,5 @@ yugabyte=# SELECT * FROM sample; -- run in second shell. ## See also -- [`BEGIN`](../txn_begin) +- [`BEGIN`](../txn_begin/) - [`ROLLBACK`](../txn_rollback) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/txn_end.md b/docs/content/latest/api/ysql/the-sql-language/statements/txn_end.md index e9ad1d29eb1b..5df60a0fe176 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/txn_end.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/txn_end.md @@ -61,6 +61,6 @@ Add optional keyword — has no effect. ## See also - [`ABORT`](../txn_abort) -- [`BEGIN`](../txn_begin) +- [`BEGIN`](../txn_begin/) - [`COMMIT`](../txn_commit) - [`ROLLBACK`](../txn_rollback) diff --git a/docs/content/latest/api/ysql/the-sql-language/statements/txn_rollback.md b/docs/content/latest/api/ysql/the-sql-language/statements/txn_rollback.md index a81dd8727988..6c47d6cfd608 100644 --- a/docs/content/latest/api/ysql/the-sql-language/statements/txn_rollback.md +++ b/docs/content/latest/api/ysql/the-sql-language/statements/txn_rollback.md @@ -61,5 +61,5 @@ Add optional keyword — has no effect. ## See also -- [`BEGIN`](../txn_begin) +- [`BEGIN`](../txn_begin/) - [`COMMIT`](../txn_commit) diff --git a/docs/content/latest/architecture/concepts/universe.md b/docs/content/latest/architecture/concepts/universe.md index 7cb9e3834150..6973f594dd8c 100644 --- a/docs/content/latest/architecture/concepts/universe.md +++ b/docs/content/latest/architecture/concepts/universe.md @@ -1,5 +1,5 @@ --- -title: Universe +title: Universe headerTitle: Universe linkTitle: Universe description: Learn about the YugabyteDB universe (or cluster). @@ -59,13 +59,13 @@ These serve different purposes as described below. The **YB-TServer** (aka the *YugabyteDB Tablet Server*) service is responsible for hosting/serving user data (for example, tables). They deal with all the user queries. -For details, see [YB-TServer](../yb-tserver). +For details, see [YB-TServer](../yb-tserver/). ### YB-Master The **YB-Master** (aka the *YugabyteDB Master Server*) service is responsible for keeping system metadata, coordinating system-wide operations, such as create/alter/drop tables, and initiating maintenance operations such as load balancing. -For details, see [YB-Master](../yb-master). +For details, see [YB-Master](../yb-master/). Below is an illustration of a simple 4-node YugabyteDB universe: @@ -73,7 +73,7 @@ Below is an illustration of a simple 4-node YugabyteDB universe: ## Universe vs cluster -A YugabyteDB universe comprises of exactly one primary cluster and zero or more read replica clusters. +A YugabyteDB universe comprises of exactly one primary cluster and zero or more read replica clusters. - A primary cluster can perform both writes and reads. Replication between nodes in a primary cluster is performed synchronously. diff --git a/docs/content/latest/architecture/concepts/yb-tserver.md b/docs/content/latest/architecture/concepts/yb-tserver.md index 45cde0b8c2cc..2fca4074a52a 100644 --- a/docs/content/latest/architecture/concepts/yb-tserver.md +++ b/docs/content/latest/architecture/concepts/yb-tserver.md @@ -48,7 +48,7 @@ In addition to throttling controls for compactions, YugabyteDB does a variety of ### Manual compactions -YugabyteDB allows compactions to be externally triggered on a table using the [`compact_table`](../../../admin/yb-admin/#compact-table) command in the [`yb-admin` utility](../../../admin/yb-admin). This can be useful for cases when new data is not coming into the system for a table anymore, users want to reclaim disk space due to overwrites/deletes that have already happened or due to TTL expiry. +YugabyteDB allows compactions to be externally triggered on a table using the [`compact_table`](../../../admin/yb-admin/#compact-table) command in the [`yb-admin` utility](../../../admin/yb-admin/). This can be useful for cases when new data is not coming into the system for a table anymore, users want to reclaim disk space due to overwrites/deletes that have already happened or due to TTL expiry. ### Server-global memstore limit diff --git a/docs/content/latest/architecture/query-layer/overview.md b/docs/content/latest/architecture/query-layer/overview.md index 0fe7f66b69fb..ed4ebd21a59e 100644 --- a/docs/content/latest/architecture/query-layer/overview.md +++ b/docs/content/latest/architecture/query-layer/overview.md @@ -12,7 +12,7 @@ menu: weight: 1172 --- -The Yugabyte Query Layer (YQL) is the upper layer of YugabyteDB. Applications interact directly with YQL using client drivers. This layer deals with the API specific aspects such as query/command compilation and the run-time (data type representations, built-in operations and more). YQL is built with extensibility in mind, and allows for new APIs to be added. Currently, YQL supports two flavors of distributed SQL APIs, namely [YSQL](../../../api/ysql) and [YCQL](../../../api/ycql). +The Yugabyte Query Layer (YQL) is the upper layer of YugabyteDB. Applications interact directly with YQL using client drivers. This layer deals with the API specific aspects such as query/command compilation and the run-time (data type representations, built-in operations and more). YQL is built with extensibility in mind, and allows for new APIs to be added. Currently, YQL supports two flavors of distributed SQL APIs, namely [YSQL](../../../api/ysql/) and [YCQL](../../../api/ycql/). ![cluster_overview](/images/architecture/cluster_overview.png) diff --git a/docs/content/latest/benchmark/resilience/jepsen-testing-ycql.md b/docs/content/latest/benchmark/resilience/jepsen-testing-ycql.md index fd309becbb7b..700e1c033770 100644 --- a/docs/content/latest/benchmark/resilience/jepsen-testing-ycql.md +++ b/docs/content/latest/benchmark/resilience/jepsen-testing-ycql.md @@ -16,14 +16,14 @@ isTocNested: true