Обсуждение: PostgreSQL 17 default value assignment doesn't work in pgAdmin4 v9.4

Поиск
Список
Период
Сортировка

PostgreSQL 17 default value assignment doesn't work in pgAdmin4 v9.4

От
LUC PHEMBA
Дата:
Hi, 

According to the official PosgreSQL 17 documentation (https://www.postgresql.org/docs/current/ddl-default.html),  default values are listed after the column data type following this format :
column_name column_data_type DEFAULT default_value

For example :
price numeric DEFAULT 9.99 (where price is the column_name, numeric the column_data_type, and 9.99 the default_value)

Can then someone explain me why the same format works in this case :
https://transfert.free.fr/P6wOY5x

but not in this other one :
https://transfert.free.fr/66abCAs
Sincerely.

Envoyé depuis l'application Gmail pour Android

Re: PostgreSQL 17 default value assignment doesn't work in pgAdmin4 v9.4

От
"David G. Johnston"
Дата:
On Sat, May 31, 2025 at 1:23 PM LUC PHEMBA <luc.phemba@gmail.com> wrote:
Can then someone explain me why the same format works in this case :
https://transfert.free.fr/P6wOY5x

but not in this other one :
https://transfert.free.fr/66abCAs
It's quite annoying that you didn't just copy the relevant SQL commands and error messages into the email.  Having to go through file share and deal with images is quite annoying.

The "format" of the command has nothing to do with it - you would have gotten a straight syntax error if you didn't have a valid format.
 
The system seems to believe that 'SYSINIT' is a column name - so the curly-quotes you are using are messing things up.  Using normal single quotes to represent text literals.

David J.

Re: PostgreSQL 17 default value assignment doesn't work in pgAdmin4 v9.4

От
"David G. Johnston"
Дата:
On Sat, May 31, 2025 at 2:14 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
It's quite annoying that you didn't just copy the relevant SQL commands and error messages into the email.  Having to go through file share and deal with images is quite annoying.

Although I suppose seeing your use of quotes may have been harder in a text email...

In any case this also really has nothing to do with pgAdmin - you are dealing with self-written SQL, it wouldn't matter what client you are using.

David J.