Incorrect mention of number of columns?

Поиск
Список
Период
Сортировка
От Daniel Westermann (DWE)
Тема Incorrect mention of number of columns?
Дата
Msg-id GV0P278MB04193C52A42F4F860F34D707D2A5A@GV0P278MB0419.CHEP278.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответы Re: Incorrect mention of number of columns?  (Magnus Hagander <magnus@hagander.net>)
Re: Incorrect mention of number of columns?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-docs
Hi,

from the limits page in the docs: https://www.postgresql.org/docs/current/limits.html

"...but a tuple of 1600 bigint columns would consume 12800 bytes and would therefore not fit inside a heap page".

Creating a table with 1600 bigint columns does work with a 8k blocksize:

$ cat gen_tab.sh
#!/bin/bash
AMOUNT_OF_COLS=$1
DATA_TYPE=$2
STATEMENT="create table t ( "
for (( i=1 ; i<${AMOUNT_OF_COLS} ; i++ ));
do
  STATEMENT+=" col${i} ${DATA_TYPE},"
done
STATEMENT+="col${AMOUNT_OF_COLS} ${DATA_TYPE} );"
echo ${STATEMENT}

.$ /gen_tab.sh 1600 bigint > a.sql

$ psql -f a.sql
CREATE TABLE

$ psql -c "\d t"
...
 col1598 | bigint |           |          |
 col1599 | bigint |           |          |
 col1600 | bigint |           |          |

Am I missing something?

Regards
Daniel


В списке pgsql-docs по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Document target_role param of ALTER DEFAULT PRIVILEGES
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Incorrect mention of number of columns?