Re: Reserved words and delimited identifiers

Поиск
Список
Период
Сортировка
От Joe Abbate
Тема Re: Reserved words and delimited identifiers
Дата
Msg-id 4ED6699B.4020105@freedomcircle.com
обсуждение исходный текст
Ответ на Re: Reserved words and delimited identifiers  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: Reserved words and delimited identifiers  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
On 11/30/2011 11:26 AM, Kevin Grittner wrote:
> You are prepared to handle the difference between char and "char", I
> hope.

We have not implemented a type "verifier" in Pyrseas.  It currently
generates SQL based on the type given in the input.  In normal usage,
dbtoyaml is expected to be invoked first, and it will generate quoted
types if necessary, e.g.,

schema public: description: standard public schema table myuser:   columns:   - info:       type: '"user"'   - active:
    type: '"char"'   - logons:       type: integer type user:   attributes:   - name: text   - pass: text
 

The quotes above are because it selects format_type(atttypid, atttypmod)
from pg_attribute.  The YAML output can then be fed into yamltodb and
will generate (assuming the "user" type and the first column of myuser
already exist):

ALTER TABLE myuser   ADD COLUMN active "char";
ALTER TABLE myuser   ADD COLUMN logons integer;

In other words, Pyrseas depends on the ultimate type verifier: the
PostgreSQL parser (and related routines).

Joe


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Large number of open(2) calls with bulk INSERT into empty table
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Why so few built-in range types?