Re: SQL COPY syntax extension (was: Performance on inserts)

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: SQL COPY syntax extension (was: Performance on inserts)
Дата
Msg-id 39AAAD6B.DC27E0C6@tm.ee
обсуждение исходный текст
Ответ на Re: Performance on inserts  (Jules Bean <jules@jellybean.co.uk>)
Ответы Re: SQL COPY syntax extension (was: Performance on inserts)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Thomas Lockhart wrote:
> 
> > Could copy be extended to support a more SQL-friendly syntax. like
> > COPY tablename FROM VALUES(
> >  (x1,y1,z1),
> >  (x2,y2,z2),
> >  (x3,y3,z3)
> > );
> > Extending the COPY command would probably be much easier than speeding up
> > INSERTS.
> 
> That syntax is a lot like a real SQL9x INSERT. Supporting multiple rows
> for inserts is probably not that difficult; but since INSERT is used so
> much we would have to make sure we don't screw up something else. At the
> moment, expanding a line of SQL into multiple internal querytree nodes
> is a bit crufty but is possible.

What I actually had in mind was a more SQL-like syntax for copy, i.e. no 
default arguments, all fields required etc. that would we easy to bolt
on 
current copy machinery but still use 'SQL' syntax (no . or \. or \\. for
EOD, 
NULL for NULL values, quotes around strings ...)

------------
Hannu


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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: Re: Too many open files (was Re: spinlock problems reported earlier)
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: SQL COPY syntax extension (was: Performance on inserts)