Re: [GENERAL] Feature Idea: Statement Echo in DO$$

2013-07-03 Thread Pavel Stehule
Hello 2013/7/3 David Johnston : > I am using a DO$$ $$ block to emulate something that admittedly may be > standard practice to accomplish using psql but for which I am using a less > capable UI. > > Anyway, the basic form is: > > DO $$ > DECLARE some_var varchar := 'value'; > BEGIN > > UPDATE ...

[GENERAL] Feature Idea: Statement Echo in DO$$

2013-07-03 Thread David Johnston
I am using a DO$$ $$ block to emulate something that admittedly may be standard practice to accomplish using psql but for which I am using a less capable UI. Anyway, the basic form is: DO $$ DECLARE some_var varchar := 'value'; BEGIN UPDATE . WHERE col = some_var; UPDATE . WHERE col = so

Re: [GENERAL] feature idea

2008-10-06 Thread Klint Gore
hubert depesz lubaczewski wrote: hi would it be possible to allow (in psql) syntax like: \do = | grep ... or even: select * from table; | zcat - > /tmp/table.data.gz i.e. - adding | ... at the end of command to send its output via pipe to another program? usecase that i had today was pretty si

Re: [GENERAL] feature idea

2008-10-06 Thread Tom Lane
hubert depesz lubaczewski <[EMAIL PROTECTED]> writes: > On Mon, Oct 06, 2008 at 11:45:44AM -0700, Steve Crawford wrote: >> What's wrong with: >> \o '| gzip -c - > foo.gz' >> \d >> \o > it's too long. and it requires disabling. i'd like something that would > work exactly like unix pipe - send inpu

Re: [GENERAL] feature idea

2008-10-06 Thread hubert depesz lubaczewski
On Mon, Oct 06, 2008 at 09:32:00PM +0200, Martijn van Oosterhout wrote: > Isn't this what \g does? only for queries. it doesn't work for psql builtins - like \do which i used in my original mail. best regards, depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.c

Re: [GENERAL] feature idea

2008-10-06 Thread Martijn van Oosterhout
On Mon, Oct 06, 2008 at 09:18:00PM +0200, hubert depesz lubaczewski wrote: > it's too long. and it requires disabling. i'd like something that would > work exactly like unix pipe - send input of one command to another. Isn't this what \g does? Have a nice day, -- Martijn van Oosterhout <[EMAIL

Re: [GENERAL] feature idea

2008-10-06 Thread hubert depesz lubaczewski
On Mon, Oct 06, 2008 at 11:45:44AM -0700, Steve Crawford wrote: > What's wrong with: > \o '| gzip -c - > foo.gz' > \d > \o > I use: > \o '|lpr' > all the time. it's too long. and it requires disabling. i'd like something that would work exactly like unix pipe - send input of one command to another

Re: [GENERAL] feature idea

2008-10-06 Thread Steve Crawford
hubert depesz lubaczewski wrote: hi would it be possible to allow (in psql) syntax like: \do = | grep ... or even: select * from table; | zcat - > /tmp/table.data.gz ... What's wrong with: \o '| gzip -c - > foo.gz' \d \o I use: \o '|lpr' all the time. Cheers, Steve -- Sent via pgsql-gene

[GENERAL] feature idea

2008-10-06 Thread hubert depesz lubaczewski
hi would it be possible to allow (in psql) syntax like: \do = | grep ... or even: select * from table; | zcat - > /tmp/table.data.gz i.e. - adding | ... at the end of command to send its output via pipe to another program? usecase that i had today was pretty simple - check list of operators that

Re: [GENERAL] Feature idea

2004-06-15 Thread Bruce Momjian
Bill Moran wrote: > Not to start an argument, but you could reverse that logic and say "Do you want > to hurt the smart, ssl users by not including helpful functionality that could > be dangerous to uneducated non-ssl users?" > > IMHO, it really depends on the design philosophy that PostgreSQL fol

Re: [GENERAL] Feature idea

2004-06-15 Thread Bill Moran
Bruce Momjian <[EMAIL PROTECTED]> wrote: > Bill Moran wrote: > > Bruce Momjian <[EMAIL PROTECTED]> wrote: > > > > > Chris Ochs wrote: > > > > > > > > What if SET SESSION AUTHORIZATION could also accept a password so that non > > > > superusers could switch to a different user? How difficult woul

Re: [GENERAL] Feature idea

2004-06-15 Thread Chris Ochs
ED]> To: "Bruce Momjian" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, June 15, 2004 8:13 AM Subject: Re: [GENERAL] Feature idea > Bruce Momjian <[EMAIL PROTECTED]> wrote: > > > Chris Ochs wrote: > > >

Fw: [GENERAL] Feature idea

2004-06-15 Thread Chris Ochs
ED]> > Sent: Tuesday, June 15, 2004 8:02 AM > Subject: Re: [GENERAL] Feature idea > > > > Chris Ochs wrote: > > > > > > What if SET SESSION AUTHORIZATION could also accept a password so that > non > > > superusers could switch to a different us

Re: [GENERAL] Feature idea

2004-06-15 Thread Bruce Momjian
Bill Moran wrote: > Bruce Momjian <[EMAIL PROTECTED]> wrote: > > > Chris Ochs wrote: > > > > > > What if SET SESSION AUTHORIZATION could also accept a password so that non > > > superusers could switch to a different user? How difficult would this be? > > > > Well, the password would go over th

Re: [GENERAL] Feature idea

2004-06-15 Thread Bill Moran
Bruce Momjian <[EMAIL PROTECTED]> wrote: > Chris Ochs wrote: > > > > What if SET SESSION AUTHORIZATION could also accept a password so that non > > superusers could switch to a different user? How difficult would this be? > > Well, the password would go over the wire unencrypted, causing a > se

Re: [GENERAL] Feature idea

2004-06-15 Thread Bruce Momjian
Chris Ochs wrote: > > What if SET SESSION AUTHORIZATION could also accept a password so that non > superusers could switch to a different user? How difficult would this be? Well, the password would go over the wire unencrypted, causing a security problem. -- Bruce Momjian

[GENERAL] Feature idea

2004-06-15 Thread Chris Ochs
What if SET SESSION AUTHORIZATION could also accept a password so that non superusers could switch to a different user? How difficult would this be? One nice side benefit to this would be that you could effectively connect as many users with Apache::DBI under mod perl without having an open conn

Re: [GENERAL] feature idea – automatic up

2004-05-21 Thread Richard Huxton
anony wrote: Maybe this feature is already out there. I guess you could write triggers to do some of this. Often when designing a database I add a start_date and end_date column to the table. The start_date is when the record was created and the end_date is when the record expired. For UPDATES, I

[GENERAL] feature idea – automatic update tracking using date fields – feedback pls

2004-05-21 Thread anony
Maybe this feature is already out there. I guess you could write triggers to do some of this. Often when designing a database I add a start_date and end_date column to the table. The start_date is when the record was created and the end_date is when the record expired. For UPDATES, I populate the