pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgbench - allow empty queries
2+ messages / 2 participants
[nested] [flat]

* pgbench - allow empty queries
@ 2016-07-09 07:27  Fabien COELHO <coelho@cri.ensmp.fr>
  0 siblings, 1 reply; 2+ messages in thread

From: Fabien COELHO @ 2016-07-09 07:27 UTC (permalink / raw)
  To: pgsql-hackers


I wanted to test overheads on an empty query, but pgbench does not allow 
it. I do not see why not.

The attached very minor patch allows empty queries.

-- 
Fabien.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

  pgbench-empty-query-1.sql (application/x-sql, 410B) download

  empty.sql (application/x-sql, 2B) download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgbench - allow empty queries
@ 2016-08-19 21:35  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Fabien COELHO <coelho@cri.ensmp.fr>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-08-19 21:35 UTC (permalink / raw)
  To: Fabien COELHO <coelho@cri.ensmp.fr>; +Cc: pgsql-hackers

Fabien COELHO <coelho@cri.ensmp.fr> writes:
> I wanted to test overheads on an empty query, but pgbench does not allow 
> it. I do not see why not.

I'm inclined to think this was probably a good thing before 9.6, as a
guard against accidentally writing an empty query into a script and
thus executing more queries than you meant to.  However, with the new
end-of-command definition I think it's impossible to write an empty
query without an explicit ";", so it seems fine now.  Pushed.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-08-19 21:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-07-09 07:27 pgbench - allow empty queries Fabien COELHO <coelho@cri.ensmp.fr>
2016-08-19 21:35 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox