123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351 |
- # Copyright Materialize, Inc. and contributors. All rights reserved.
- #
- # Use of this software is governed by the Business Source License
- # included in the LICENSE file at the root of this repository.
- #
- # As of the Change Date specified in that file, in accordance with
- # the Business Source License, use of this software will be governed
- # by the Apache License, Version 2.0.
- query T
- SELECT quote_ident('xyz');
- ----
- xyz
- query T
- SELECT quote_ident('XyZ');
- ----
- "XyZ"
- query T
- SELECT quote_ident('xyZ');
- ----
- "xyZ"
- query T
- SELECT quote_ident('"xyz"');
- ----
- """xyz"""
- query T
- SELECT quote_ident('');
- ----
- ""
- query T
- SELECT quote_ident('""');
- ----
- """"""
- query T
- SELECT quote_ident('"');
- ----
- """"
- query T
- SELECT quote_ident(NULL);
- ----
- NULL
- query T
- SELECT quote_ident('NULL');
- ----
- "NULL"
- query T
- SELECT quote_ident('"NULL"');
- ----
- """NULL"""
- query T
- SELECT quote_ident('"xyz');
- ----
- """xyz"
- query T
- SELECT quote_ident('xyz"');
- ----
- "xyz"""
- query T
- SELECT quote_ident('wx"yz"');
- ----
- "wx""yz"""
- query T
- SELECT quote_ident('xyz_abc');
- ----
- xyz_abc
- query T
- SELECT quote_ident('Xyz_Abc');
- ----
- "Xyz_Abc"
- query T
- SELECT quote_ident('xyZ_Abc');
- ----
- "xyZ_Abc"
- query T
- SELECT quote_ident('xyz_123');
- ----
- xyz_123
- query T
- SELECT quote_ident('Xyz_123');
- ----
- "Xyz_123"
- query T
- SELECT quote_ident('xyz abc');
- ----
- "xyz abc"
- query T
- SELECT quote_ident('Xyz Abc');
- ----
- "Xyz Abc"
- query T
- SELECT quote_ident('xyZ Abc');
- ----
- "xyZ Abc"
- query T
- SELECT quote_ident('xyz_abc123');
- ----
- xyz_abc123
- query T
- SELECT quote_ident('Xyz_Abc123');
- ----
- "Xyz_Abc123"
- query T
- SELECT quote_ident('123_xyz');
- ----
- "123_xyz"
- query T
- SELECT quote_ident('123_Xyz');
- ----
- "123_Xyz"
- query T
- SELECT quote_ident('xyz_abc_123');
- ----
- xyz_abc_123
- query T
- SELECT quote_ident('Xyz_Abc_123');
- ----
- "Xyz_Abc_123"
- query T
- SELECT quote_ident('xyz_123_abc');
- ----
- xyz_123_abc
- query T
- SELECT quote_ident('Xyz_123_Abc');
- ----
- "Xyz_123_Abc"
- query T
- SELECT quote_ident('xyz 123 abc');
- ----
- "xyz 123 abc"
- query T
- SELECT quote_ident('Xyz 123 Abc');
- ----
- "Xyz 123 Abc"
- query T
- SELECT quote_ident('xyz_abc_123');
- ----
- xyz_abc_123
- query T
- SELECT quote_ident('Xyz_Abc_123');
- ----
- "Xyz_Abc_123"
- query T
- SELECT quote_ident('_xyz_abc');
- ----
- _xyz_abc
- query T
- SELECT quote_ident('_Xyz_Abc');
- ----
- "_Xyz_Abc"
- query T
- SELECT quote_ident('_xyz_abc_123');
- ----
- _xyz_abc_123
- query T
- SELECT quote_ident('_Xyz_Abc_123');
- ----
- "_Xyz_Abc_123"
- query T
- SELECT quote_ident('_123_xyz_abc');
- ----
- _123_xyz_abc
- query T
- SELECT quote_ident('_123_Xyz_Abc');
- ----
- "_123_Xyz_Abc"
- query T
- SELECT quote_ident('_xyz_abc_123_');
- ----
- _xyz_abc_123_
- query T
- SELECT quote_ident('_Xyz_Abc_123_');
- ----
- "_Xyz_Abc_123_"
- query T
- SELECT quote_ident('_123_xyz_abc_');
- ----
- _123_xyz_abc_
- query T
- SELECT quote_ident('_123_Xyz_Abc_');
- ----
- "_123_Xyz_Abc_"
- query T
- SELECT quote_ident('_xyz 123 abc_');
- ----
- "_xyz 123 abc_"
- query T
- SELECT quote_ident('_Xyz 123 Abc_');
- ----
- "_Xyz 123 Abc_"
- query T
- SELECT quote_ident('xyz "abc"');
- ----
- "xyz ""abc"""
- query T
- SELECT quote_ident('Xyz "Abc"');
- ----
- "Xyz ""Abc"""
- query T
- SELECT quote_ident('xyZ "Abc"');
- ----
- "xyZ ""Abc"""
- query T
- SELECT quote_ident('he"llo_wor"ld');
- ----
- "he""llo_wor""ld"
- query T
- SELECT quote_ident('He"Llo_Wor"Ld');
- ----
- "He""Llo_Wor""Ld"
- query T
- SELECT quote_ident('xyz_123 "abc"');
- ----
- "xyz_123 ""abc"""
- query T
- SELECT quote_ident('Xyz_123 "Abc"');
- ----
- "Xyz_123 ""Abc"""
- query T
- SELECT quote_ident('123_xyz_abc');
- ----
- "123_xyz_abc"
- query T
- SELECT quote_ident('123_Xyz_Abc');
- ----
- "123_Xyz_Abc"
- query T
- SELECT quote_ident('xyz abc 123');
- ----
- "xyz abc 123"
- query T
- SELECT quote_ident('Xyz Abc 123');
- ----
- "Xyz Abc 123"
- query T
- SELECT quote_ident('🌍');
- ----
- "🌍"
- query T
- SELECT quote_ident(' 🌍 ');
- ----
- " 🌍 "
- query T
- SELECT quote_ident(' 🌍 " ');
- ----
- " 🌍 "" "
- query T
- SELECT quote_ident(' 🌍 " ');
- ----
- " 🌍 "" "
- query T
- SELECT quote_ident(' xyz 🌍 ');
- ----
- " xyz 🌍 "
- query T
- SELECT quote_ident(' xyZ 🌍 ');
- ----
- " xyZ 🌍 "
- # Reserved keyword
- query T
- SELECT quote_ident('with');
- ----
- "with"
- query T
- SELECT quote_ident('natural');
- ----
- "natural"
- query T
- SELECT quote_ident('second');
- ----
- "second"
- # Unreserved keyword
- query T
- SELECT quote_ident('materialize');
- ----
- materialize
- query T
- SELECT quote_ident('table');
- ----
- table
- simple
- SELECT quote_ident('this ident is too long and will return an error 🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎')
- ----
- db error: ERROR: string is not a valid identifier: "this ident is too long and will return an error 🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎"
- DETAIL: identifier too long (len: 272, max: 255, value: "this ident is too long and will return an error 🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎🌎")
|