diff --git a/customization/general-settings.mdx b/customization/general-settings.mdx index 9e39172..5560db3 100644 --- a/customization/general-settings.mdx +++ b/customization/general-settings.mdx @@ -54,6 +54,8 @@ Older servers have neither: MySQL before 5.7.8, MariaDB before 10.1.1. A stateme **No limit** still caps an HTTP request at one hour, because the transport needs a ceiling. +An export, **Copy To**, a table transfer and a data comparison read with the timeout off and put it back when they finish. Their reads wait for the side that writes, so a long copy would otherwise be cancelled part way. MySQL and MariaDB give up on a read left waiting for 10 minutes, and TablePro raises the session's `net_write_timeout` to that when a read starts. + ## Command line tool **Command Line** shows whether the shell command links to this copy of the app. Copy its Terminal line to install or remove the link. See [Terminal](/integrations/terminal#install) for installation and commands. diff --git a/databases/mssql.mdx b/databases/mssql.mdx index 26192d6..5ffc11a 100644 --- a/databases/mssql.mdx +++ b/databases/mssql.mdx @@ -90,6 +90,8 @@ The sidebar nests tables under their schema, hides the built-in role schemas (`d INSERTs from the data grid leave IDENTITY columns out, so the server assigns them, and `TEXTSIZE` is raised at connect, so `nvarchar(max)` and `text` values arrive whole rather than cut to FreeTDS's 2048-byte default. +A table's DDL, and a SQL export of it, keeps its primary key and unique constraints under their own names, every foreign key with all its columns, its referenced schema and its `ON DELETE` and `ON UPDATE` actions, check constraints, computed columns, each identity's seed and increment, and a column collation that differs from the database's. A disabled check stays disabled, and one the source turned on `WITH NOCHECK` is turned on that way again after the rows. Changing a column's type or nullability in the structure editor keeps its collation. + A `datetimeoffset` keeps its offset, `2024-01-15T10:30:45.1234567+07:00`, so edit it in that form. A `geography`, `geometry` or `hierarchyid` value shows as its bytes in hex; select `col.ToString()` to read it as text. ## Session options diff --git a/databases/oracle.mdx b/databases/oracle.mdx index a9794fd..4aadc9a 100644 --- a/databases/oracle.mdx +++ b/databases/oracle.mdx @@ -71,7 +71,7 @@ The database has to accept TLS without mutual TLS: set **Mutual TLS (mTLS) authe ## Editing and queries -Table info carries columns, types, nullability, primary keys, indexes, foreign keys, and CREATE TABLE DDL. The structure editor writes `ALTER TABLE` with double-quoted identifiers for case-sensitive names: ADD, RENAME COLUMN, MODIFY, DROP, and CREATE INDEX. +Table info carries columns, types, nullability, primary keys, indexes, foreign keys, and CREATE TABLE DDL. The DDL, and a SQL export, declare the table's primary key, unique and check constraints, so the foreign keys an export adds after the tables find the keys they reference. The structure editor writes `ALTER TABLE` with double-quoted identifiers for case-sensitive names: ADD, RENAME COLUMN, MODIFY, DROP, and CREATE INDEX. The editor runs SQL and PL/SQL, and grid paging is written as `OFFSET … ROWS FETCH NEXT … ROWS ONLY`. Import and export work as they do elsewhere, and a remote server reaches through an [SSH tunnel](/connections/ssh-tunneling). @@ -151,6 +151,8 @@ A `TIMESTAMP WITH TIME ZONE` stored with a region name shows the wall clock in t Grid edits, deletes and filters spell dates and timestamps in a form that does not depend on the session's `NLS_DATE_FORMAT`, so they work whatever it is set to. A table without a primary key matches the row by every column, and an edit is refused when that match would need a LOB, LONG, BFILE, XMLTYPE, JSON, VECTOR or object value, since Oracle cannot compare those. +Import and **Copy To** write each value the way a grid edit writes it for the target column's type, so `00123` stays `00123` in a `VARCHAR2`, a date goes through a fixed format, and text for an `NVARCHAR2` keeps characters the database character set lacks. A query parameter follows the type picked for it, as in [Query parameters](/features/query-parameters). + Anything else renders as ``. Report those through [GitHub Issues](https://github.com/TableProApp/TablePro/issues). ## Users & Roles diff --git a/databases/postgresql.mdx b/databases/postgresql.mdx index f658425..8b401fd 100644 --- a/databases/postgresql.mdx +++ b/databases/postgresql.mdx @@ -109,6 +109,8 @@ Rename from the same sheet, or in place: select the row and press Return. A partitioned table is listed once, with how many partitions it holds beside its name. Expand it for the partitions, each labelled with its bound: `FROM ('2024-01-01') TO ('2024-02-01')`, `IN ('de', 'fr')`, `WITH (modulus 4, remainder 0)`, or `DEFAULT`. Expand a partition again if it is subpartitioned. +The DDL of a partitioned table, and a SQL export of it, creates every partition with what it holds of its own: a check, key, default or `NOT NULL` its parent does not have, its own indexes and its comments. A foreign table partition is written only as a comment, with its server and options, because the export reads its rows through the parent and a restore into it would write them to the remote table again. Those rows have no partition until you create it. + A partition is a relation, so opening, truncating, renaming and dropping one work as they do on any table. A partition declared in another schema, `CREATE TABLE archive.orders_2023 PARTITION OF public.orders`, is reached under its parent and carries `archive` into every statement built from it. Tables using the older `INHERITS` inheritance are listed normally, each child on its own. Turn partitions off with **Partitions** under **View Options**. diff --git a/databases/sap-hana.mdx b/databases/sap-hana.mdx index b6c3cf3..06e03c1 100644 --- a/databases/sap-hana.mdx +++ b/databases/sap-hana.mdx @@ -86,7 +86,7 @@ The [query timeout](/customization/general-settings#query-timeout) sends the sam Dates and times are the stored wall-clock value, with no time zone added. HANA's empty date is a value rather than `NULL` and shows as `0000-00-00`, with `00:00:00` and the fraction after it on the longer types. -A value longer than 64 MiB is cut at 64 MiB, and the result's message counts the cut cells. +A value longer than 64 MiB is cut at 64 MiB in the grid, and the result's message counts the cut cells. An export, Copy To or Compare that reaches such a value stops with an error instead of writing it cut. Query parameters and values typed into the grid go to the server as bound parameters, never pasted into the SQL. Dates and times take the forms in the table, the empty date included, with a `T` between date and time also accepted and the fraction optional. `BOOLEAN` takes `TRUE`, `FALSE`, `1` or `0`. A `DECIMAL` value with more fraction digits than the column's scale is refused rather than rounded. diff --git a/databases/teradata.mdx b/databases/teradata.mdx index 81958dd..152e4ed 100644 --- a/databases/teradata.mdx +++ b/databases/teradata.mdx @@ -30,7 +30,7 @@ Click **New Connection…**, select **Teradata**, enter the host, username, and | **Transaction Mode** | Options section. `DEFAULT`, `ANSI`, or `TERA`, uppercase | | **SSL Mode** | **Network** tab. **Disabled** by default | -Leave **Transaction Mode** on `DEFAULT`, which takes whatever the system is configured for, unless a script needs `ANSI` or `TERA` case sensitivity and commit rules on the session. A system reachable only through a bastion works over an [SSH tunnel](/connections/ssh-tunneling). +Leave **Transaction Mode** on `DEFAULT`, which takes whatever the system is configured for, unless a script needs `ANSI` or `TERA` case sensitivity and commit rules on the session. With `DEFAULT`, the mode the session got is read from `HELP SESSION` at logon. In an `ANSI` session a save commits with `COMMIT WORK` and sends no `BT` or `ET`, and a save never commits or rolls back changes you ran in the editor and have not committed yet. A system reachable only through a bastion works over an [SSH tunnel](/connections/ssh-tunneling). ## Connection URL @@ -42,7 +42,7 @@ teradata://user:password@host:1025/database ## Databases and objects -A database and a user are both namespaces in Teradata, and both appear as top-level databases in the sidebar with their tables and views inside. A tab bound to a second database keeps the same session: `DATABASE "name"` runs ahead of its statements instead of a reconnect. +A database and a user are both namespaces in Teradata, and both appear as top-level databases in the sidebar with their tables and views inside. A tab bound to a second database keeps the same session: `DATABASE "name"` runs ahead of its statements instead of a reconnect. The switch is refused while a transaction is open, because Teradata takes nothing but `COMMIT` or `ET` after `DATABASE` inside one. Identifiers are quoted with double quotes. Teradata has no `LIMIT`, so a table's first page comes back with `TOP` and later pages with `QUALIFY ROW_NUMBER()`. @@ -70,6 +70,8 @@ Test TLS on **Required (skip verify)** rather than **Preferred**, or a failed ha - Macros and stored procedures are not in the sidebar. Query them from the editor. - LDAP, Kerberos, and JWT logon fail before the connect is attempted. Use `TD2` or `TDNEGO`. - The TLS port is fixed at `443`. +- A `NUMBER`, `BLOB`, `CLOB`, `JSON`, `XML` or `PERIOD` column cannot be read yet. `CAST` it to `DECIMAL` or `VARCHAR` in the query. +- **Run All** runs a script that holds a `CREATE`, `ALTER`, `DROP` or other DDL statement one statement at a time, with no transaction around it, because Teradata accepts nothing after DDL inside a transaction. In an `ANSI` session the script still needs a `COMMIT` after each DDL statement, and DDL the structure editor runs stays uncommitted until you commit. ## Troubleshooting diff --git a/features/copy-objects.mdx b/features/copy-objects.mdx index 6aa5864..d93040c 100644 --- a/features/copy-objects.mdx +++ b/features/copy-objects.mdx @@ -354,9 +354,13 @@ Two databases on one connection can be copied between only where the driver open connection of its own. DuckDB and PGlite hold their database inside the driver instance, so the sheet refuses and names the reason. -Dameng, SAP HANA and Teradata read a table whole before the first batch is written, because their -drivers do not stream rows. On those three, a table larger than memory is a table this cannot copy, -and **Stop** waits for the read. +PostgreSQL, MySQL, MariaDB, SQL Server, SAP HANA and DuckDB read only a few batches ahead of the +writes, so a slow target never makes the copy hold the table in memory. SQLite, Teradata and the +other engines that stream read as fast as the source answers and keep the batches the target has not +written yet. + +Dameng reads a table whole before the first batch is written, because its driver does not stream +rows. There, a table larger than memory is a table this cannot copy, and **Stop** waits for the read. Read-only connections are dimmed in the target picker with the reason shown.