Answer the question
In order to leave comments, you need to log in
How to remove quotes from table and column names in PostgreSQL?
I used to work with MySQL and MsSQL subd, I decided to use PostgreSQL in the project.
In MySQL, you could use a query like this:
cmd.CommandText = "SELECT * FROM Users WHERE UserName='"+UserName.Text+"' AND Pass='"+Pass.Password+"'";
cmd.CommandText = "SELECT * FROM public.\"Users\" WHERE \"UserName\"='"+UserName.Text+"' AND \"Pass\"='"+Pass.Password+"'";
Answer the question
In order to leave comments, you need to log in
If I write without quotes, it gives an error: 42703 column 'username' does not exist
Found
an article: https:
//stackoverflow.com/a/postgresql-query-syntax ... , but if I write users without register, then quotes are not needed
there is no need for quotes at all, here is a copy-pasted example of a request from my working site
insert into users
(user_email, user_password, user_role, user_login)
values (?,?,?,?)
';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question