Re: Quotes in SQL

Поиск
Список
Период
Сортировка
От Paul M Foster
Тема Re: Quotes in SQL
Дата
Msg-id 20020513235148.A22819@quillandmouse.com
обсуждение исходный текст
Ответ на Re: Quotes in SQL  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Quotes in SQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Quotes in SQL  (Jeff Davis <list-pgsql-general@empires.org>)
Список pgsql-general
On Tue, May 14, 2002 at 11:31:03AM +1000, Martijn van Oosterhout wrote:

> On Mon, May 13, 2002 at 02:49:47PM -0600, Randall Barber wrote:
> > Hi--I'm completely new to PostGres...  From what I read in the
> documentation, sql here is same as there.
> >
> > SELECT * FROM FOO.BAR WHERE FOO.BAR.BAZ='1234';
> >
> > However, I just finished building my own PostGres and when I try to use
> it, I have to do stuff like this:
> >
> > SELECT * FROM "FOO"."BAR" WHERE "FOO"."BAR"."BAZ" = '1234';
> >
> > Is this a Postgres thing?  Or did I compile it wrong?  Or is it an option
> to create_db?
>
> That's normal. If you use quotes when you create the table, you (usually)
> need quotes when accessing the fields. If you don't use quotes when creating
> the table, you don't need them when accessing.
>

Huh? Doesn't the parser strip off the quotes? Are you saying it stores
the quotes and expects you to provide them when accessing the fields?
(Pardon if this seems like an incredibly dumb question.)

Paul

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Strange interaction with php's pg_query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Quotes in SQL