Re: creating "user" table

Поиск
Список
Период
Сортировка
От Daniel ?erud
Тема Re: creating "user" table
Дата
Msg-id 1001264542.304zilch@home.se
обсуждение исходный текст
Ответ на creating "user" table  (Chris <tomcat@weirdness.com>)
Ответы Re: creating "user" table
Список pgsql-general
Thanks for the information !!

delyx.

Daniel Åkerud.

> >>>>> "Chris" == Chris  <tomcat@weirdness.com> writes:
>
> Chris> Hi,
> Chris> This one is more for the developers, but other
comments welcome.
>
> Chris> Since we can't create a table called user in a
normal database due to
> Chris> the reserved keyword problem,
>
> False precondition!
>
>     template1=# create database demo;
>     CREATE DATABASE
>     template1=# \c demo
>     You are now connected to database demo.
>     demo=# create table "user" (name text, age int);
>     CREATE
>     demo=# \d
>        List of relations
>      Name | Type  | Owner
>     ------+-------+--------
>      user | table | merlyn
>     (1 row)
>
>     demo=# \d user
>               Table "user"
>      Attribute |  Type   | Modifier
>     -----------+---------+----------
>      name      | text    |
>      age       | integer |
>
>     demo=# insert into "user" values ('Randal', 39);
>     INSERT 1034607 1
>     demo=# insert into "user" values ('Russ', 38);
>     INSERT 1034608 1
>     demo=# insert into "user" values ('Ron', 35);
>     INSERT 1034609 1
>     demo=# select * from "user" order by age;
>       name  | age
>     --------+-----
>      Ron    |  35
>      Russ   |  38
>      Randal |  39
>     (3 rows)
>
>     demo=#
>
> You can quote any reserved word to get any name you want.
> You just need to think of the table name of demo as
_ "demo" _.
>
> --
> Randal L. Schwartz - Stonehenge Consulting Services,
Inc. - +1 503 777 0095
> <merlyn@stonehenge.com>
<URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy,
etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-
enrollment Perl training!
>
> ---------------------------(end of broadcast)-------------
--------------
> TIP 3: if posting/reading through Usenet, please send an
appropriate
> subscribe-nomail command to majordomo@postgresql.org so
that your
> message can get through to the mailing list cleanly
>



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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: ERROR: Tuple is too big: size 15880, max size 8140
Следующее
От: R Talbot
Дата:
Сообщение: Where are Perl DBI and DBD for PostgreSQL??