pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedQuery from shell
6+ messages / 6 participants
[nested] [flat]
* Query from shell
@ 2006-04-06 18:37 Judith <jaltamirano@correolux.com.mx>
0 siblings, 1 reply; 6+ messages in thread
From: Judith @ 2006-04-06 18:37 UTC (permalink / raw)
To: pgsql-sql
Hi every body, somebody can show me hot to execute a query from a
shell
thanks in advanced!!!
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Query from shell
@ 2006-04-06 21:37 Owen Jacobson <ojacobson@osl.com>
0 siblings, 3 replies; 6+ messages in thread
From: Owen Jacobson @ 2006-04-06 21:37 UTC (permalink / raw)
To: pgsql-sql
Judith wrote:
> Hi every body, somebody can show me hot to execute a
> query from a shell
echo QUERY HERE | psql databasename
Or, if you want to run several queries, run psql and run your queries there.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Query from shell
@ 2006-04-06 21:39 Bricklen Anderson <banderson@presinet.com>
parent: Owen Jacobson <ojacobson@osl.com>
2 siblings, 0 replies; 6+ messages in thread
From: Bricklen Anderson @ 2006-04-06 21:39 UTC (permalink / raw)
To: Owen Jacobson <ojacobson@osl.com>; +Cc: pgsql-sql
Owen Jacobson wrote:
> Judith wrote:
>
>
>> Hi every body, somebody can show me hot to execute a
>>query from a shell
>
>
> echo QUERY HERE | psql databasename
>
> Or, if you want to run several queries, run psql and run your queries there.
>
or
psql -d <dbname> -c "your query here"
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Query from shell
@ 2006-04-06 21:40 Terry Lee Tucker <terry@esc1.com>
parent: Judith <jaltamirano@correolux.com.mx>
0 siblings, 0 replies; 6+ messages in thread
From: Terry Lee Tucker @ 2006-04-06 21:40 UTC (permalink / raw)
To: pgsql-sql
On Thursday 06 April 2006 02:37 pm, Judith saith:
> Hi every body, somebody can show me hot to execute a query from a
> shell
>
> thanks in advanced!!!
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
Do this:
psql -c 'SELECT code FROM cust' rnd;
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Query from shell
@ 2006-04-06 21:43 kevin.kempter@dataintellect.com
parent: Owen Jacobson <ojacobson@osl.com>
2 siblings, 0 replies; 6+ messages in thread
From: kevin.kempter@dataintellect.com @ 2006-04-06 21:43 UTC (permalink / raw)
To: pgsql-sql
On Thursday 06 April 2006 15:37, Owen Jacobson wrote:
> Judith wrote:
> > Hi every body, somebody can show me hot to execute a
> > query from a shell
>
> echo QUERY HERE | psql databasename
>
> Or, if you want to run several queries, run psql and run your queries
> there.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
I think you can also run:
psql -f filename.sql database_name
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Query from shell
@ 2006-04-06 22:56 Jim Buttafuoco <jim@contactbda.com>
parent: Owen Jacobson <ojacobson@osl.com>
2 siblings, 0 replies; 6+ messages in thread
From: Jim Buttafuoco @ 2006-04-06 22:56 UTC (permalink / raw)
To: Owen Jacobson <ojacobson@osl.com>; pgsql-sql
or
psql db <<EOQ
select...;
delete...;
update...;
\q
EOQ
---------- Original Message -----------
From: "Owen Jacobson" <ojacobson@osl.com>
To: <pgsql-sql@postgresql.org>
Sent: Thu, 6 Apr 2006 14:37:51 -0700
Subject: Re: [SQL] Query from shell
> Judith wrote:
>
> > Hi every body, somebody can show me hot to execute a
> > query from a shell
>
> echo QUERY HERE | psql databasename
>
> Or, if you want to run several queries, run psql and run your queries there.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
------- End of Original Message -------
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2006-04-06 22:56 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-06 18:37 Query from shell Judith <jaltamirano@correolux.com.mx>
2006-04-06 21:40 ` Terry Lee Tucker <terry@esc1.com>
2006-04-06 21:37 Re: Query from shell Owen Jacobson <ojacobson@osl.com>
2006-04-06 21:39 ` Bricklen Anderson <banderson@presinet.com>
2006-04-06 21:43 ` kevin.kempter@dataintellect.com
2006-04-06 22:56 ` Jim Buttafuoco <jim@contactbda.com>
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