Обсуждение: psql -e

Поиск
Список
Период
Сортировка

psql -e

От
Beth Gatewood
Дата:
Hi -

There has been suggestions to start psql with the -E switch to see the
queries that the \ commands exectue.

However,

1-I can not use this option...we are currently running 6.3 version and I
only see a -e switch

2- If I use the -e switch, if I type a query by hand I will get the
query echoed back (QUERY:blah blah blah).  However, if I execute \dt I
do not see any query echoed.

Thanks for your thoughts on this...
Beth


Re: psql -e

От
"D. Duccini"
Дата:
see if you can start it with a capitalized -E

actmgr=> \dt
QUERY: SELECT usename, relname, relkind, relhasrules FROM pg_class,
pg_user WHERE usesysid = relowner and ( relkind = 'r') and relname !~
'^pg_'  ORDER BY relname


On Wed, 1 Nov 2000, Beth Gatewood wrote:

>
> Hi -
>
> There has been suggestions to start psql with the -E switch to see the
> queries that the \ commands exectue.
>
> However,
>
> 1-I can not use this option...we are currently running 6.3 version and I
> only see a -e switch
>
> 2- If I use the -e switch, if I type a query by hand I will get the
> query echoed back (QUERY:blah blah blah).  However, if I execute \dt I
> do not see any query echoed.
>
> Thanks for your thoughts on this...
> Beth
>


-----------------------------------------------------------------------------
david@backpack.com            BackPack Software, Inc.        www.backpack.com
+1 651.645.7550 voice       "Life is an Adventure.
+1 651.645.9798 fax            Don't forget your BackPack!"
-----------------------------------------------------------------------------


Re: psql -e

От
Beth Gatewood
Дата:
Hi-

Yes-I had already tried that....that is when I was given a list of what was all
possible switches were and hence why I tried -e.


psql: illegal option -- E
Usage: psql [options] [dbname]
         -a authsvc              set authentication service
         -A                      turn off alignment when printing out attributes

         -c query                run single query (slash commands too)
         -d dbName               specify database name
         -e                      echo the query sent to the backend
         -f filename             use file as a source of queries
         -F sep                  set the field separator (default is '|')
[cut]

Any other thoughts?

Thanks-
Beth

"D. Duccini" wrote:

> see if you can start it with a capitalized -E
>
> actmgr=> \dt
> QUERY: SELECT usename, relname, relkind, relhasrules FROM pg_class,
> pg_user WHERE usesysid = relowner and ( relkind = 'r') and relname !~
> '^pg_'  ORDER BY relname
>
> On Wed, 1 Nov 2000, Beth Gatewood wrote:
>
> >
> > Hi -
> >
> > There has been suggestions to start psql with the -E switch to see the
> > queries that the \ commands exectue.
> >
> > However,
> >
> > 1-I can not use this option...we are currently running 6.3 version and I
> > only see a -e switch
> >
> > 2- If I use the -e switch, if I type a query by hand I will get the
> > query echoed back (QUERY:blah blah blah).  However, if I execute \dt I
> > do not see any query echoed.
> >
> > Thanks for your thoughts on this...
> > Beth
> >
>
> -----------------------------------------------------------------------------
> david@backpack.com            BackPack Software, Inc.        www.backpack.com
> +1 651.645.7550 voice       "Life is an Adventure.
> +1 651.645.9798 fax            Don't forget your BackPack!"
> -----------------------------------------------------------------------------


Re: psql -e

От
"D. Duccini"
Дата:
other suggestions:

1. upgrade :P
2. try getting a newer version of just psql ?
3. have someone else run the queries and give you the output ?

> Hi-
>
> Yes-I had already tried that....that is when I was given a list of what was all
> possible switches were and hence why I tried -e.
>
>
> psql: illegal option -- E
> Usage: psql [options] [dbname]
>          -a authsvc              set authentication service
>          -A                      turn off alignment when printing out attributes
>
>          -c query                run single query (slash commands too)
>          -d dbName               specify database name
>          -e                      echo the query sent to the backend
>          -f filename             use file as a source of queries
>          -F sep                  set the field separator (default is '|')
> [cut]
>
> Any other thoughts?
>
> Thanks-
> Beth
>
> "D. Duccini" wrote:
>
> > see if you can start it with a capitalized -E
> >
> > actmgr=> \dt
> > QUERY: SELECT usename, relname, relkind, relhasrules FROM pg_class,
> > pg_user WHERE usesysid = relowner and ( relkind = 'r') and relname !~
> > '^pg_'  ORDER BY relname
> >
> > On Wed, 1 Nov 2000, Beth Gatewood wrote:
> >
> > >
> > > Hi -
> > >
> > > There has been suggestions to start psql with the -E switch to see the
> > > queries that the \ commands exectue.
> > >
> > > However,
> > >
> > > 1-I can not use this option...we are currently running 6.3 version and I
> > > only see a -e switch
> > >
> > > 2- If I use the -e switch, if I type a query by hand I will get the
> > > query echoed back (QUERY:blah blah blah).  However, if I execute \dt I
> > > do not see any query echoed.
> > >
> > > Thanks for your thoughts on this...
> > > Beth
> > >
> >
> > -----------------------------------------------------------------------------
> > david@backpack.com            BackPack Software, Inc.        www.backpack.com
> > +1 651.645.7550 voice       "Life is an Adventure.
> > +1 651.645.9798 fax            Don't forget your BackPack!"
> > -----------------------------------------------------------------------------
>


-----------------------------------------------------------------------------
david@backpack.com            BackPack Software, Inc.        www.backpack.com
+1 651.645.7550 voice       "Life is an Adventure.
+1 651.645.9798 fax            Don't forget your BackPack!"
-----------------------------------------------------------------------------


Re: psql -e

От
Tom Lane
Дата:
"D. Duccini" <duccini@backpack.com> writes:
> other suggestions:

> 1. upgrade :P
> 2. try getting a newer version of just psql ?
> 3. have someone else run the queries and give you the output ?

Or

4. Run postmaster with -d2 and look in postmaster log to see what
   psql is doing.
5. Read the psql source code to see what queries it will emit.

Suggestions 2 & 3 might not work so well, since the system catalogs
tend to change somewhat from release to release, and psql's queries
get adjusted appropriately.  A query generated by a several-versions-
newer psql might not work as desired on Beth's 6.3 installation.

I like suggestion #1 myself ;-).  6.3 is roughly late Neolithic in
Postgres years...

            regards, tom lane

upgrade from 7.0.2 to 7.0.3

От
rudy
Дата:
I am running Linux RedHat 7.0 and other than making a backup copy of our
database, is there anything else that I should be aware before upgrading
postgresql from 7.0.2 to 7.0.3? It is important that I limit the downtime
other than the upgrade. Has anyone heard or read of any issues?

I assume if it is more involved than simply un-tarring the file in the
proper dir than there will be a README file with instructions or
something...

Thanks,

Rudy Laczkovich