Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@
**** xref:reference:sql/sql-data-types/geometry.adoc[]
**** xref:reference:sql/sql-data-types/interval.adoc[]
**** xref:reference:sql/sql-data-types/json.adoc[]
**** xref:reference:sql/sql-data-types/numeric-type/numeric.adoc[]
**** xref:reference:sql/sql-data-types/numeric-type/numeric-data-type-aliases.adoc[]
**** xref:reference:sql/sql-data-types/numeric-type/numeric.adoc[Numeric]
***** xref:reference:sql/sql-data-types/numeric-type/numeric-data-type-aliases.adoc[]
**** xref:reference:sql/sql-data-types/row.adoc[]
**** xref:reference:sql/sql-data-types/text.adoc[]
**** xref:reference:sql/sql-data-types/time-type/time.adoc[]
Expand Down Expand Up @@ -705,7 +705,6 @@
***** xref:reference:sql/sql-functions/string-functions/replace.adoc[]
***** xref:reference:sql/sql-functions/string-functions/starts-with.adoc[]
***** xref:reference:sql/sql-functions/string-functions/strpos.adoc[]
***** xref:reference:sql/sql-functions/string-functions/substr.adoc[]
***** xref:reference:sql/sql-functions/string-functions/substring.adoc[]
***** xref:reference:sql/sql-functions/string-functions/upper.adoc[]
**** xref:reference:sql/sql-functions/timestamp-functions/index.adoc[Timestamp]
Expand Down
4 changes: 4 additions & 0 deletions modules/get-started/pages/whats-new-cloud.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ This page lists new features added to Redpanda Cloud.

== May 2026

=== Redpanda SQL

Redpanda SQL is available on BYOC clusters running on AWS. Run real-time SQL queries on Redpanda topic data, including the Iceberg history of Iceberg-enabled topics, using standard PostgreSQL syntax. Connect with `psql` or any PostgreSQL driver. See the xref:sql:get-started/sql-quickstart.adoc[Quickstart] and xref:sql:get-started/overview.adoc[Overview].

=== Centralized egress for BYOC on AWS: beta

You can route all BYOC cluster egress through your own AWS Transit Gateway and hub VPC instead of a per-VPC NAT Gateway, so outbound traffic exits through your centralized inspection point. This is useful for regulated environments that prohibit per-VPC NAT Gateways and for consolidating egress behind a single, predictable public IP for outbound allowlisting. Centralized egress is in a glossterm:beta[] release and is enabled per organization. Contact your account team for access. See xref:networking:byoc/aws/nat-free-egress.adoc[Configure Centralized Egress with AWS Transit Gateway].
Expand Down
4 changes: 2 additions & 2 deletions modules/reference/pages/sql/comment-support.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ In Redpanda SQL, single-line comments should always be placed at the end of the
[source,sql]
----
SELECT column1, column2 -- This is an example single line comment
FROM table_name;
FROM default_redpanda_catalog=>table_name;
----

=== Comment on multiple lines

[source,sql]
----
SELECT /* comment 1 */ column1, column2
FROM table_name /* comment 2 */
FROM default_redpanda_catalog=>table_name /* comment 2 */
WHERE column3 = 42 /* comment 3 */ ;
----

Expand Down
8 changes: 4 additions & 4 deletions modules/reference/pages/sql/sql-clauses/group-by.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `GROUP BY` clause returns a group of records from one or more tables that ha

[NOTE]
====
You can use xref:reference:sql/sql-functions/aggregate-functions/index.adoc[aggregate functions] such as `COUNT()`, `MAX()`, `MIN()`, and `SUM()` to perform operations on the grouped values in the `SELECT` statement.
You can use xref:reference:sql/sql-functions/aggregate-functions/index.adoc[aggregate functions] such as `count()`, `max()`, `min()`, and `sum()` to perform operations on the grouped values in the `SELECT` statement.
====

== Syntax
Expand Down Expand Up @@ -199,7 +199,7 @@ The query returns:

=== GROUP BY with aggregate functions

This example calculates the total amount each customer has paid for orders using the `SUM()` aggregate function:
This example calculates the total amount each customer has paid for orders using the `sum()` aggregate function:

[source,sql]
----
Expand All @@ -226,7 +226,7 @@ The query returns:

=== GROUP BY with JOIN condition

This query joins the `orders` table with the `customer` table and groups customers by name. It uses `COUNT()` to count the number of products each customer has purchased:
This query joins the `orders` table with the `customer` table and groups customers by name. It uses `count()` to count the number of products each customer has purchased:

[source,sql]
----
Expand Down Expand Up @@ -254,7 +254,7 @@ The query returns:

=== GROUP BY with date data type

The `order_date` column uses the `DATE` data type. This example groups the order quantity and total price by date using the `DATE()` function:
The `order_date` column uses the `date` data type. This example groups the order quantity and total price by date using the `DATE()` function:

[source,sql]
----
Expand Down
4 changes: 2 additions & 2 deletions modules/reference/pages/sql/sql-clauses/having.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This syntax includes the following elements:
* `SELECT column_1, column_2,...` selects the columns to display.
* `FROM table_name` selects the table to retrieve data from.
* `GROUP BY column_name(s)` lists the columns to group.
* `HAVING condition_aggregate_function` provides the condition for filtering rows formed by the `GROUP BY` clause. The condition can use an aggregate function such as `SUM()`, `COUNT()`, or `MIN()`.
* `HAVING condition_aggregate_function` provides the condition for filtering rows formed by the `GROUP BY` clause. The condition can use an aggregate function such as `sum()`, `count()`, or `min()`.

== Examples

Expand Down Expand Up @@ -140,7 +140,7 @@ This returns:

=== HAVING clause with AVG function

The following example uses the `AVG` aggregate function to filter subjects with an average score greater than 80:
The following example uses the `avg` aggregate function to filter subjects with an average score greater than 80:

[source,sql]
----
Expand Down
2 changes: 1 addition & 1 deletion modules/reference/pages/sql/sql-clauses/index.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= SQL clauses
= SQL Clauses
:description: SQL clauses define how data is retrieved, filtered, and manipulated.
:page-topic-type: reference

Expand Down
6 changes: 3 additions & 3 deletions modules/reference/pages/sql/sql-clauses/offset.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `OFFSET` clause skips a specified number of records from the result set.
[source,sql]
----
SELECT columns
FROM table_name
FROM default_redpanda_catalog=>table_name
OFFSET num;
----

Expand All @@ -25,7 +25,7 @@ The following example uses a `salaryemp` table.

[source,sql]
----
SELECT * FROM salaryemp ORDER BY emp_sal;
SELECT * FROM default_redpanda_catalog=>salaryemp ORDER BY emp_sal;
----

The query returns:
Expand All @@ -52,7 +52,7 @@ The following query skips the first three rows and returns the next five, ordere

[source,sql]
----
SELECT * FROM salaryemp
SELECT * FROM default_redpanda_catalog=>salaryemp
ORDER BY emp_sal
LIMIT 5 OFFSET 3;
----
Expand Down
4 changes: 2 additions & 2 deletions modules/reference/pages/sql/sql-clauses/order-by.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ The query returns:

=== ORDER BY with TEXT data types

In this example, two small tables are created with `TEXT` data:
In this example, two small tables are created with `text` data:

[source,sql]
----
Expand Down Expand Up @@ -228,7 +228,7 @@ VALUES
(INTERVAL '2 months 1 hours');
----
`ORDER BY` on an `INTERVAL` column sorts values by their total duration. For example, `1 month 30 days 20 hours` is greater than `2 months 1 hour` because `1 month` equals `30 days`, making the first interval equivalent to `60 days 20 hours` versus `60 days 1 hour`.
`ORDER BY` on an `interval` column sorts values by their total duration. For example, `1 month 30 days 20 hours` is greater than `2 months 1 hour` because `1 month` equals `30 days`, making the first interval equivalent to `60 days 20 hours` versus `60 days 1 hour`.
[source,sql]
----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Set operations
= Set Operations
:description: Set operations combine, compare, or contrast result sets from multiple SELECT statements.
:page-topic-type: reference

Expand Down
8 changes: 4 additions & 4 deletions modules/reference/pages/sql/sql-data-types/array.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Array
= array
:description: In Redpanda SQL, an array stores a collection of elements that have the same data type (any built-in data type can be used).
:page-topic-type: reference

Expand All @@ -21,7 +21,7 @@ CREATE TABLE movie_night (
);
----

This syntax specifies the size of the array. However, it does not enforce any limits, and the behavior is the same as for arrays of unspecified length. There is also another way to declare an array, by prepending the `ARRAY` keyword after the data type of the elements:
This syntax specifies the size of the array. However, it does not enforce any limits, and the behavior is the same as for arrays of unspecified length. There is also another way to declare an array, by prepending the `array` keyword after the data type of the elements:

[source,sql]
----
Expand All @@ -33,7 +33,7 @@ CREATE TABLE movie_night (

== Array values

You can create array literals by using the `ARRAY` keyword and combining it with the array's values enclosed in square brackets and separated by commas:
You can create array literals by using the `array` keyword and combining it with the array's values enclosed in square brackets and separated by commas:

[source,sql]
----
Expand Down Expand Up @@ -96,7 +96,7 @@ SELECT '{"{\"key1\": 1, \"key2\": \"value\"}", NULL, true}'::json[];

[NOTE]
====
In this example, the double quotes which are a part of the JSON value are required to be escaped with a backslash, so that they are not mistaken with the double quote, which marks the end of the element.
In this example, the double quotes which are a part of the `json` value are required to be escaped with a backslash, so that they are not mistaken with the double quote, which marks the end of the element.
====

== Access arrays
Expand Down
8 changes: 4 additions & 4 deletions modules/reference/pages/sql/sql-data-types/bool.adoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
= Bool
:description: BOOL is a data type for expressions that return one of two possible values: true or false.
= bool
:description: `bool` is a data type for expressions that return one of two possible values: true or false.
:page-topic-type: reference

== Overview

A `BOOL` is a data type for expressions that return one of two possible values: `true` or `false`.
A `bool` is a data type for expressions that return one of two possible values: `true` or `false`.

[WARNING]
====
`BOOLEAN` is an alias for the `BOOL` data type. You can create a table using `BOOLEAN`, but Redpanda SQL stores and processes the values as `BOOL`.
`BOOLEAN` is an alias for the `bool` data type. You can create a table using `BOOLEAN`, but Redpanda SQL stores and processes the values as `bool`.
====

== Format
Expand Down
4 changes: 2 additions & 2 deletions modules/reference/pages/sql/sql-data-types/bytea.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ The bytea data type supports a narrow set of operations. Operations not listed a
| `'\xDEADBEEF'::bytea`

| `length(payload)`
| Returns the byte count as `INT`. Distinct from `length(text)`, which returns the codepoint count.
| Returns the byte count as `int`. Distinct from `length(text)`, which returns the codepoint count.

| `octet_length(payload)`
| Returns the byte count as `INT`. Equivalent to `length()` on a bytea value.
| Returns the byte count as `int`. Equivalent to `length()` on a bytea value.
|===

== Read bytea from external sources
Expand Down
10 changes: 5 additions & 5 deletions modules/reference/pages/sql/sql-data-types/date.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
= Date
:description: The DATE data type stores calendar dates without a time zone in Redpanda SQL.
= date
:description: The `date` data type stores calendar dates without a time zone in Redpanda SQL.
:page-topic-type: reference

The `DATE` data type stores calendar dates without a time zone. Use it to store and insert date values.
The `date` data type stores calendar dates without a time zone. Use it to store and insert date values.

[NOTE]
====
Expand All @@ -22,7 +22,7 @@ YYYY-MM-DD

== Examples

In this example, the `emp_submission` table consists of the candidate ID, candidate name, the submitted department, and a submission date with a `DATE` data type.
In this example, the `emp_submission` table consists of the candidate ID, candidate name, the submitted department, and a submission date with a `date` data type.

[source,sql]
----
Expand Down Expand Up @@ -51,7 +51,7 @@ Now that the data has been inserted, execute the following `SELECT` statement:
SELECT * FROM emp_submission;
----

The following is the result of the `SELECT` statement where the values in the `sub_date` column have `DATE` data type:
The following is the result of the `SELECT` statement where the values in the `sub_date` column have `date` data type:

[source,sql]
----
Expand Down
36 changes: 18 additions & 18 deletions modules/reference/pages/sql/sql-data-types/geography.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
= Geography
:description: The GEOGRAPHY data type stores geodetic (spherical) spatial point values using the WGS84 coordinate system (SRID 4326).
= geography
:description: The `geography` data type stores geodetic (spherical) spatial point values using the WGS84 coordinate system (SRID 4326).
:page-topic-type: reference

The `GEOGRAPHY` data type stores geodetic (spherical) spatial point values using the WGS84 coordinate system (SRID 4326). Unlike xref:reference:sql/sql-data-types/geometry.adoc[GEOMETRY], which uses planar coordinates, `GEOGRAPHY` interprets coordinates as longitude and latitude on the Earth's surface, and distance calculations return results in meters.
The `geography` data type stores geodetic (spherical) spatial point values using the WGS84 coordinate system (SRID 4326). Unlike xref:reference:sql/sql-data-types/geometry.adoc[`geometry`], which uses planar coordinates, `geography` interprets coordinates as longitude and latitude on the Earth's surface, and distance calculations return results in meters.

[NOTE]
====
Expand All @@ -11,7 +11,7 @@ Redpanda SQL supports only `POINT` geographies. Multi-part geometries such as `P

== Format

`GEOGRAPHY` values can be specified in the following formats:
`geography` values can be specified in the following formats:

* WKT: `POINT(longitude latitude)` (SRID defaults to 4326)
* EWKT: `SRID=4326;POINT(longitude latitude)`
Expand All @@ -24,35 +24,35 @@ SELECT GEOGRAPHY 'POINT(-73.9857 40.7484)';

== SRID handling

`GEOGRAPHY` always uses SRID 4326 (WGS84). If you specify a different SRID, an error is returned.
`geography` always uses SRID 4326 (WGS84). If you specify a different SRID, an error is returned.

== Casting

`GEOGRAPHY` supports the following casts:
`geography` supports the following casts:

* `GEOGRAPHY` -> `TEXT`: Returns EWKB hex string
* `TEXT` -> `GEOGRAPHY`: Parses WKT or EWKB string
* `GEOGRAPHY` -> `GEOMETRY`: Removes SRID
* `GEOMETRY` -> `GEOGRAPHY`: Adds SRID=4326
* `geography` -> `text`: Returns EWKB hex string
* `text` -> `geography`: Parses WKT or EWKB string
* `geography` -> `geometry`: Removes SRID
* `geometry` -> `geography`: Adds SRID=4326

[NOTE]
====
Casting between `GEOGRAPHY` and `POINT` is not supported.
Casting between `geography` and `point` is not supported.
====

== Functions

The following functions work with `GEOGRAPHY` values:
The following functions work with `geography` values:

[cols="2,3,1",options="header"]
|===
|Function |Description |Return type
|`ST_ASTEXT(geography)` |Returns the WKT representation |`text`
|`ST_ASTEXT(geography, max_digits)` |Returns the WKT representation with limited decimal digits |`text`
|`ST_ASEWKT(geography)` |Returns the Extended WKT representation (includes SRID) |`text`
|`ST_ASEWKT(geography, max_digits)` |Returns the Extended WKT representation with limited decimal digits |`text`
|`ST_DISTANCE(geography, geography)` |Returns the geodetic distance in meters using the WGS84 ellipsoid |`double precision`
|`ST_DISTANCE(geography, geography, use_spheroid)` |Returns the geodetic distance in meters. Set `use_spheroid` to `false` for a faster spherical approximation. |`double precision`
|`st_astext(geography)` |Returns the WKT representation |`text`
|`st_astext(geography, max_digits)` |Returns the WKT representation with limited decimal digits |`text`
|`st_asewkt(geography)` |Returns the Extended WKT representation (includes SRID) |`text`
|`st_asewkt(geography, max_digits)` |Returns the Extended WKT representation with limited decimal digits |`text`
|`st_distance(geography, geography)` |Returns the geodetic distance in meters using the WGS84 ellipsoid |`double precision`
|`st_distance(geography, geography, use_spheroid)` |Returns the geodetic distance in meters. Set `use_spheroid` to `false` for a faster spherical approximation. |`double precision`
|===

== Examples
Expand Down
Loading