From: | Joel Burton <jburton(at)scw(dot)org> |
---|---|
To: | Wade Burlingame <bad(at)dog(dot)bad> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Why are quotes required around table / column names in SQL statements? |
Date: | 2001-04-08 05:31:36 |
Message-ID: | Pine.LNX.4.21.0104080129410.11864-100000@olympus.scw.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 2 Apr 2001, Wade Burlingame wrote:
> ...and is there any way I can get rid of this requirement? I'm just getting
> into PGSQL and I find the quotes very distracting.
The quotes are only *needed* around tables/columns/etc if they contain
characters not in the alphanumeric set, or if it conflicts with a reserved
word.
So, one can say
CREATE TABLE foo
but must use quotes for
CREATE TABLE "foo is the word"
or
CREATE TABLE "table"
or such.
The only time you normally see them (if you haven't used them) is w/tools
like pg_dump. And there's a command-line switch to not show them if not
neccssary, IIRC.
HTH,
--
Joel Burton <jburton(at)scw(dot)org>
Director of Information Systems, Support Center of Washington
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Burton | 2001-04-08 05:32:46 | Re: Deploying psqlodbc to Win98 |
Previous Message | Doug McNaught | 2001-04-08 05:17:24 | Re: Why are quotes required around table / column names in SQL statements? |