Re: Proposal: RETURNING primary_key()

Поиск
Список
Период
Сортировка
От Igal @ Lucee.org
Тема Re: Proposal: RETURNING primary_key()
Дата
Msg-id 5701F266.8020307@lucee.org
обсуждение исходный текст
Ответ на Re: Proposal: RETURNING primary_key()  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: Proposal: RETURNING primary_key()  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
On 4/3/2016 4:34 PM, Dave Cramer wrote:

On 4/3/2016 8:21 AM, Dave Cramer wrote:

I'd like to turn this question around. Are there good reasons to use -ng over pgjdbc ?

As to your question, you may be interested to know that pgjdbc is more performant than ng.
That's good to know, but unfortunately pgjdbc is unusable for us until
https://github.com/pgjdbc/pgjdbc/issues/488 is fixed.

Also, as I mentioned in the ticket, I can't imagine RETURNING * being performant if, for example, I INSERT a large chunk of data like an image data or an uploaded file.


Thanks for the reminder!

So I"m guessing the reason to use ng is to avoid returning * ?

I'm not sure if you're serious or if you're just trying to be "cute".  This ticket should still be fixed.  It really doesn't make any sense to me that the driver will just blindly append "RETURNING *" to the query.

If I want to return all of the columns from an UPDATE or an INSERT -- then I will add "RETURNING *" myself.  And if I don't add it, then I probably don't want the driver to second guess me, or to think that it knows better than I do what I want.  If I wanted software that thinks that it knows what I want better than I do -- then I would stick with SQL Server rather than switch to Postgres.

The driver used to work until someone decided to append "RETURNING *" to the SQL code and make it unusable in many cases.

Was there any discussion on this before it was added?

Igal Sapir
Lucee Core Developer
Lucee.org


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

Предыдущее
От: Petr Jelinek
Дата:
Сообщение: Re: Proposal: Generic WAL logical messages
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: pgbench more operators & functions