Unix Technical Forum

Is there a psql function equivalent to a session log

This is a discussion on Is there a psql function equivalent to a session log within the pgsql Hackers forums, part of the PostgreSQL category; --> One of my testers asked me if there is a function in psql that is equivalent to a session ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:11 AM
lsunley@mb.sympatico.ca
 
Posts: n/a
Default Is there a psql function equivalent to a session log

One of my testers asked me if there is a function in psql that is
equivalent to a session log - something that will write out commands sent
to the server and the results written to a file while still displaying the
results on screen.

I can't find anything like this, but I think I can put it together quite
quickly. Has anyone else done something like this?

Lorne

--
-----------------------------------------------------------
lsunley@mb.sympatico.ca
-----------------------------------------------------------


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 03:11 AM
Bruno Wolff III
 
Posts: n/a
Default Re: Is there a psql function equivalent to a session log

On Sat, Jan 01, 2005 at 12:09:05 -0500,
lsunley@mb.sympatico.ca wrote:
> One of my testers asked me if there is a function in psql that is
> equivalent to a session log - something that will write out commands sent
> to the server and the results written to a file while still displaying the
> results on screen.
>
> I can't find anything like this, but I think I can put it together quite
> quickly. Has anyone else done something like this?


You can kind of do it with tee (/o output can be sent to programs), but tee
doesn't flush output so you would probably need to modify it to flush on
newlines or something if you really wanted to use it for an interactive
session.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:55 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com