Re: PL/pgSQL 2

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: PL/pgSQL 2
Дата
Msg-id 1409585617786-5817199.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: PL/pgSQL 2  (Joel Jacobson <joel@trustly.com>)
Список pgsql-hackers
Joel Jacobson-2 wrote
> On Mon, Sep 1, 2014 at 4:26 PM, Craig Ringer <

> craig@

> > wrote:
>> Well, the idiom:
>>
>>   EXECUTE format("SELECT %I FROM %I WHERE $1", col, tbl) USING val;
>>
>> is not lovely. It works, but it's clumsy.
> 
> This is exactly why we need a new language.
> All the clumsy stuff we cannot fix in plpgsql, can easily be fixed in
> plpgsql2, with the most beautiful syntax we can come up with.
> 
> I guess it's a question if we want to support things like this. If we
> want to, then we also want a new language.

Regardless of how they are ultimately implemented - a new language, PRAGMA
infrastructure, or adding syntax to plpgsql - improving upon the current
6-item ToDo on the Wiki would be a lot more valuable at this point in time. 
I do think better organization than the current ToDo format can be had but
even just moving many of these ideas there would be a start.

The goal isn't to introduce a new language version - that would simply be a
means to achieving an end that is not reasonably achievable in any other
way.

Ideally, for each feature and behavior, we'd be able to provide suggestions
on how it could be implemented in the various cases and the pros/cons of
doing so in each.  If there are enough items with beautiful syntax in
version 2 of the language then that concrete evidence and action plan would
have a much better chance of gaining commiter support than generalities and
theories.

Adding a whole new language to avoid 2 pet-peeves and an introduce a
behavior (syntax to allow multi-row DDL) that is controversial is not likely
to seem worth it to those you are asking to write and maintain this new
language.  I get the goal of the post was to generate ideas but at the same
time the idea generation can occur without you putting forth the conclusion
that a new language is required - conclusions like that are not useful at
the start of a research project (even if that conclusion motivated the
project in the first place).

David J.



--
View this message in context: http://postgresql.1045698.n5.nabble.com/PL-pgSQL-2-tp5817121p5817199.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.



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

Предыдущее
От: Joel Jacobson
Дата:
Сообщение: Re: PL/pgSQL 2
Следующее
От: Stepan Rutz
Дата:
Сообщение: Patch for psql History Display on MacOSX