Simple query question - Mailing list pgsql-novice

From Chris Boget
Subject Simple query question
Date
Msg-id 00ae01c2aa86$b3e3de30$8c01a8c0@ENTROPY
Whole thread Raw
Responses Re: Simple query question
List pgsql-novice
I'm in the process of converting my site from MySQL to PGSQL and
I've come across something odd that I can't find an explenation for in
the documentation.

All my MySQL queries use double quotes around the field value I am
looking for.  IE

SELECT * FROM sessions WHERE session_name = "session_name"

However, when I run that in PGSQL, I get an error message:

ERROR:  Attribute "session_name" not found

But if I replace the double quotes with single quotes, the query runs
fine.
Where in the documentation can I find why that is?

Also, in MySQL you could use \G after the query (instead of using a
semi colon) so that the record set would be displayed with the columns
vertical instead of horizontal.  This is especially useful when you are
using the command line.  Does PGSQL have something like that?  This
is something else I couldn't find in the documentation.

thnx,
Chris


pgsql-novice by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Decrease in performance with 7.3/optimizing a query
Next
From: "paul butler"
Date:
Subject: Re: Simple query question