Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamwie lang kann eine alias anweisung werden
ARG_MAX
, usually ≥ 256 kB).Definition
“Alias” means a secondary name that expands to something longer (command, identifier, resource name). Length constraints originate from deeper layers (identifier length, command-line buffer, column name length, packet size, database field width, etc.).
Major technical domains
a) Command-line shells
• Bash/Z-sh: alias ll='…'
. No intrinsic cap; the whole definition plus its expansion must fit into the shell’s parsing buffer and the kernel’s execve()
argument block.
• getconf ARG_MAX
on modern Linux returns 2097152 bytes (2 MiB) or more; macOS ≈ 262 kB. Consequently an alias can easily contain thousands of characters, but readability suffers long before the hard limit.
b) SQL databases (column/table aliases)
• Oracle ≤ 30 chars (identifier limit).
• PostgreSQL ≤ 63 chars (identifier limit).
• SQL Server ≤ 128 chars (documented by Microsoft, see Stack Overflow ref #4).
• MySQL / MariaDB ≤ 256 chars (for identifiers stored as varchar(256)
).
Exceeding these limits raises a syntax error. jOOQ users often hit them when auto-generated aliases from deep nesting exceed Oracle’s 30-character ceiling (GitHub issue #17971).
c) Application / CMS
• Contao page aliases: database schema VARCHAR(128)
→ 128 chars max.
• Automic Automation objects: alias field up to 200 chars according to vendor docs.
d) Firewall / network appliances
• pfSense: single alias names are long enough for practical use; constraint is global—sum of all alias table entries must be < ½ of the Firewall Maximum Table Entries
(default 400 000). Very long literal names only affect readability.
e) E-mail systems
• SMTP local-part 64 chars, domain 255 chars per label, entire address ≤ 320 chars (RFC 5321 + RFC 2181). Providers set smaller limits in practice.
f) Programming languages (type aliases, import aliases)
• C/C++: compiler must accept ≥ 1024 chars per identifier; de-facto limited only by memory.
• Python: identifier length virtually unbounded; PEP 8 recommends ≤ 79 columns for source lines.
• VHDL/Verilog: tool-chain memory is the main limit; IEEE-1076 requires ≥ 1024 chars.
Practical thresholds
– Human factors: once an alias exceeds ~80–120 chars it becomes hard to maintain.
– Tooling: code editors, version-control diffs, linter checks, and CI pipelines may flag or truncate very long lines.
ARG_MAX
(2 MiB typical), so shell aliases almost never hit the OS limit. Example (Bash) hitting the system limit:
# create a 300-kB alias: purely demonstrative, not useful
alias big=$(printf 'x%.0s' {1..300000})
# The above will fail with "Argument list too long" on most systems.
Example (Oracle):
SELECT long_column_name AS "nested.nested.nested.nested.LONG_COL"
-- ORA-00972: identifier is too long (≥ 31 chars)
Work-around: shorten manually or use column_name().as("n1")
.
Alias length is not governed by one global rule. In shells it is practically unbounded (limited by ARG_MAX
), in SQL engines it ranges from 30 to 128 chars, in CMS/firewalls by their own schema constraints, and in programming languages mainly by readability. Identify your exact environment and consult its documentation; if you approach the limit, switch to functions, scripts, or schema objects instead of a single oversized alias.