pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedSQL syntax
2+ messages / 2 participants
[nested] [flat]
* SQL syntax
@ 2005-01-17 14:05 Gary Broadbent <Gary.Broadbent@gtnet.com>
0 siblings, 1 reply; 2+ messages in thread
From: Gary Broadbent @ 2005-01-17 14:05 UTC (permalink / raw)
To: pgsql-admin
Hi,
I am testing some integration with PostgreSQL version 8 rc5 but am having
trouble with the SQL syntax.
The help on pgAdmin III say that the syntax of an insert statement is:
INSERT INTO CITIES VALUES ('San Francisco', '(-194.0, 53.0)');
however I am not finding this to work.
Instead I receive the error:
ERROR: relation "CITIES" does not exist
I then tried to do a select:
SELECT * FROM CITIES;
and this did not work. However when I tried
SELECT * FROM "GTX"."CITIES";
my select statement DID work.
Why are do my select statements work with quotes surrounding the schema and
table although the help does not say that quotes are required?
What is the correct syntax for an insert statement?
I am also using a JDBC for PostgreSQL but this returns the same errors as I
have described above.
Regards,
Gary.
________________________________________________________________________________
This email (and any attachments) is private and confidential, and is intended
solely for the addressee. If you have received this communication in error
please remove it and inform us via telephone or email.
Although we take all possible steps to ensure mail and attachments are free
from malicious content, malware and virii, we cannot accept any responsibility
whatsoever for any changes to content outwith our administrative bounds.
The views represented within this mail are solely the view of the
author and do not reflect the views of Graham Technology as a whole.
________________________________________________________________________________
Graham Technology plc http://www.gtnet.com
________________________________________________________________________________
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: SQL syntax
@ 2005-01-17 18:22 Tom Lane <tgl@sss.pgh.pa.us>
parent: Gary Broadbent <Gary.Broadbent@gtnet.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2005-01-17 18:22 UTC (permalink / raw)
To: Gary.Broadbent@gtnet.com; +Cc: pgsql-admin
"Gary Broadbent" <Gary.Broadbent@gtnet.com> writes:
> I then tried to do a select:
> SELECT * FROM CITIES;
> and this did not work. However when I tried
> SELECT * FROM "GTX"."CITIES";
> my select statement DID work.
> Why are do my select statements work with quotes surrounding the schema and
> table although the help does not say that quotes are required?
Apparently you created the table with all-upper-case not all-lower-case
name. See
http://developer.postgresql.org/docs/postgres/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS
particularly the last paragraph of that section.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-01-17 18:22 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-17 14:05 SQL syntax Gary Broadbent <Gary.Broadbent@gtnet.com>
2005-01-17 18:22 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox