From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Simon Riggs <simon(at)2ndQuadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgbench post-connection command |
Date: | 2012-01-12 20:53:18 |
Message-ID: | 4F0F483E.2070508@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12.01.2012 22:04, Tom Lane wrote:
> Simon Riggs<simon(at)2ndQuadrant(dot)com> writes:
>> On Thu, Jan 12, 2012 at 5:32 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> More like "\once ... any SQL command or meta command here ..."
>>> if we want to extend the scripting language. But I'd be perfectly happy
>>> with a command-line switch that specifies a script file to be run once.
>
>> Once per connection, yes?
>
> Hmmm ... good question. Heikki was speculating about doing CREATE TABLE
> or similar, which you'd want done only once period.
I was creating a separate table for each connection to work with...
> But I see no very
> strong reason why cases like that couldn't be handled outside of
> pgbench. So yeah, once per connection.
... so that is exactly what I was thinking too.
For things that only need to run once, period, you can just do:
psql -c "CREATE TABLE"; pgbench ...
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-01-12 21:00:02 | Re: measuring spinning |
Previous Message | Kevin Grittner | 2012-01-12 20:36:02 | Re: Remembering bug #6123 |