| От | Tom Lane |
|---|---|
| Тема | Re: rowset-returning function mismatch |
| Дата | |
| Msg-id | 28590.1106957301@sss.pgh.pa.us обсуждение |
| Ответ на | rowset-returning function mismatch ("Ed L." <pgsql@bluepolka.net>) |
| Список | pgsql-general |
"Ed L." <pgsql@bluepolka.net> writes:
> I ask because it seems like "char" and char should match as type names,
> but don't.
No, they don't. char without any quotes is a SQL reserved word that
is equivalent to CHARACTER(1). "char" with quotes is not a reserved
word, by definition. For largely historical reasons it happens to match
a single-byte datatype that existed in the deeps of time in PostQUEL,
and is still used in our system catalogs as a sort of poor man's
enumeration type.
Note the different results here:
regression=# create table foo (a char, b "char");
CREATE TABLE
regression=# \d foo
Table "public.foo"
Column | Type | Modifiers
--------+--------------+-----------
a | character(1) |
b | "char" |
regression=#
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера