If you use mixed case in PostgreSQL then you must quote the identifiers or it will fold them to lower case. pgAdmin creates tables using the name you specify - if you use upper case characters then it will quote them, because PostgreSQL requires that you do so. If you want unquoted names, you must use lower case. This applies to pgAdmin and psql.
Regards, Dave.
Any object. New table for example. I created table named Employee and a few columns for it and got next sql script:
-- Table: public."Employee"
-- DROP TABLE public."Employee";
CREATE TABLE public."Employee"
(
"Employee_Id" int8 NOT NULL DEFAULT nextval('public."Employee_Employee_Id_seq"'::text),
"First_Name" varchar(50),
"Last_Name" varchar,
CONSTRAINT "pkEmployee" PRIMARY KEY ("Employee_Id")
) WITHOUT OIDS;
As you can see table name is inside quotation marks. - this was not happen when I created table manually.
Now in my code I need to use next select : "select * from \"Employee\""" instead of "select * from Employee" that not so beautiful( I think ).
Hi,
What sort of object? What did you try to call it?
Regards, Dave.
Hi Dave.
First of all thank you for a great work.
And now question:
When I create some object using pgAdmin I get this object named with quotation marks. Is it possible to avoid it? How?
Thank you
Alexander N. Treyner
alex@treyner.israel.net