SQLite name/identifier length limit?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SQLite name/identifier length limit?

Dominique Devienne
https://www.sqlite.org/limits.html doesn't say explicitly.
Unlimited? SQLITE_MAX_LENGTH ?

PostgreSQL is limited to 63 chars.
Oracle is limited to 30 and 128 chars (latter > 12.2).
Other DBs? (just curious). --DD
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite name/identifier length limit?

Richard Hipp-3
On 8/29/18, Dominique Devienne <[hidden email]> wrote:
> https://www.sqlite.org/limits.html doesn't say explicitly.
> Unlimited? SQLITE_MAX_LENGTH ?
>
> PostgreSQL is limited to 63 chars.
> Oracle is limited to 30 and 128 chars (latter > 12.2).
> Other DBs? (just curious). --DD

There is no arbitrary limit, other than the ability of a signed 32-bit
integer to measure the number of bytes.  But you are limited to
SQLITE_MAX_SQL_LENGTH bytes for an SQL statement, and since an
identifier needs to fit inside an SQL statement, I suppose that makes
the identifier length limit SQLITE_MAX_SQL_LENGTH (default:
1,000,000).

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite name/identifier length limit?

Dominique Devienne
On Wed, Aug 29, 2018 at 12:09 PM Richard Hipp <[hidden email]> wrote:

> On 8/29/18, Dominique Devienne <[hidden email]> wrote:
> > https://www.sqlite.org/limits.html doesn't say explicitly.
> > Unlimited? SQLITE_MAX_LENGTH ?
> >
> > PostgreSQL is limited to 63 chars.
> > Oracle is limited to 30 and 128 chars (latter > 12.2).
> > Other DBs? (just curious). --DD
>
> There is no arbitrary limit, other than the ability of a signed 32-bit
> integer to measure the number of bytes.  But you are limited to
> SQLITE_MAX_SQL_LENGTH bytes for an SQL statement, and since an
> identifier needs to fit inside an SQL statement, I suppose that makes
> the identifier length limit SQLITE_MAX_SQL_LENGTH (default: 1,000,000).
>

Minus the minimum required CREATE TABLE ... (a), so 17 chars :)
Thanks Richard. Wanted to confirm I wasn't missing anything here. --DD
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users