Review: Typed Table

Поиск
Список
Период
Сортировка
От Hitoshi Harada
Тема Review: Typed Table
Дата
Msg-id e08cc0401001180801h112437dfxbbe59816534626e0@mail.gmail.com
обсуждение исходный текст
Ответы Re: Review: Typed Table  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
I reviewed this patch today.

Overview:
Almost everything is OK. Applied with few hunks (in psql/describle.c 2
lines offset), compiled without warnings, passed regression tests. The
results of advertised queries are as expected. Coding style is of
course satisfied. Since this is utility changes performance does not
go down.

* in namespace.c
I didn't see why this file has been changed.    case 0:        ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),                errmsg("improper qualified name (zero-length name list)")));
break;
in DeconstructQualifiedName().

* Crash with wrong column name
regression=# create type persons_type as (name text, bdate date);
CREATE TYPE
regression=# create table persons of persons_type (myname with options
not null);
server closed the connection unexpectedly       This probably means the server terminated abnormally       before or
whileprocessing the request.
 
The connection to the server was lost. Attempting reset: Succeeded.

* Conflict between transactions
I'm not sure if this is related with the patch but I met this situation;

A: regression=# create type persons_type as (name text, bdate date);
A: CREATE TYPE

A: regression=# begin;
A: BEGIN

A: regression=# drop type persons_type;
A: DROP TYPE

B: regression=# create table persons of persons_type; (LOCK)
A: regression=# rollback;
A: ROLLBACK
B: CREATE TABLE

B: regression=# drop table persons;
B: DROP TABLE

A: regression=# begin;
A: BEGIN

A: regression=# drop type persons_type;
A: DROP TYPE

B: regression=# create table persons of persons_type; (NO LOCK)
B: CREATE TABLE

A: regression=# commit;
A: COMMIT

B: regression=# select 'persons_type'::regtype;
B: ERROR:  type "persons_type" does not exist
B: LINE 1: select 'persons_type'::regtype;

I have at all no idea why the second create table doesn't lock.

* Comment needed in pg_dump.h
Please add comment on reloftype of struct _tableInfo

* Consistency between add/drop and rename
Typed table can rename its column but can NOT add/drop column. Is this
what the spec requires? IMHO, if it allows rename, do so for add/drop
and if do not allow add/drop, do not so rename.

I read SQL standard about typed table for few minutes but did not find
any problems. It mentions about "reference column" as the patch
document says and I, too, think our oid mechanism will do for that as
the doc says.


Regards,

-- 
Hitoshi Harada


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: mailing list archiver chewing patches
Следующее
От: Markus Wanner
Дата:
Сообщение: Re: Testing with concurrent sessions