Обсуждение: Select statement error in PostgreSQL 11.9

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

Select statement error in PostgreSQL 11.9

От
Mohammed Afsar
Дата:

Dear Team,

When am doing select table column name copy paste getting below and if am typing colum name it is working could please check and confirm why it behaving.


1.User has all privileges and for other columns it is working fine.

2.charecter set also same and there is no extension

3.data type is character varying 255

You are now connected to database "stage" as user "staguser".
stage=> select sr_name from table_user;
ERROR:  syntax error at or near "select sr_name from table_user"
LINE 1: select sr_name from table_user;

Regards,

Mohammed Afsar 

Re: Select statement error in PostgreSQL 11.9

От
"David G. Johnston"
Дата:
On Tue, Feb 21, 2023 at 12:24 PM Mohammed Afsar <vmdapsar@gmail.com> wrote:

When am doing select table column name copy paste getting below and if am typing colum name it is working could please check and confirm why it behaving.


If copy-paste is mis-behaving it is likely because of invisible characters in whatever you are copying.  If typing out the same query by hand results in a working query this is evidence of the same.


1.User has all privileges and for other columns it is working fine.

2.charecter set also same and there is no extension

3.data type is character varying 255


Given that you have a basic syntax error none of those above observations are helpful - you didn't get far enough into the parsing processing.
David J.