Re: [HACKERS] use of alias

2008-02-11 Thread Brendan Jurd
Though to be safe you should be quoting MT and ST with quote_ident() before putting them into a dynamic statement. Cheers BJ On Feb 12, 2008 4:38 PM, Brett McBride <[EMAIL PROTECTED]> wrote: > you could do this with 'execute' like so: > > execute 'select count(*) into count1 from ' || MT || ','

Re: [HACKERS] use of alias

2008-02-11 Thread Brett McBride
you could do this with 'execute' like so: execute 'select count(*) into count1 from ' || MT || ',' || ST || ' where ' || MT || '.phonenumber= ' || ST || '.phonenumber' into v_variable; brett Amit jain wrote: Hello Everybody, I am trying to change a oracle function to postgreSQL. I have to

[HACKERS] use of alias

2008-02-11 Thread Amit jain
Hello Everybody, I am trying to change a oracle function to postgreSQL. I have to use the function parameter in different query so i need to use alias command. but i am not able to use this alias in "from clause" of select statment. could anybody please let me know how can i use it in from clause

Re: [HACKERS] -U option in psql

2008-02-11 Thread Tom Lane
"Jaime Casanova" <[EMAIL PROTECTED]> writes: > In 8.3.0 (windows installation) if I execute this command i get an > error while in 8.2 i get a psql command prompt, is this a change in > behaviour or a bug? > H:\Archivos de programa\PostgreSQL\8.3\bin>psql template1 -U postgres > psql: warning: ext

[HACKERS] -U option in psql

2008-02-11 Thread Jaime Casanova
Hi, In 8.3.0 (windows installation) if I execute this command i get an error while in 8.2 i get a psql command prompt, is this a change in behaviour or a bug? H:\Archivos de programa\PostgreSQL\8.3\bin>psql template1 -U postgres psql: warning: extra command-line argument "postgres" ignored Passwo

Re: [HACKERS] Patch review

2008-02-11 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Feb 11, 2008 at 05:09:45PM -0600, Decibel! wrote: > On Feb 9, 2008, at 1:08 AM, Tom Lane wrote: > >Let's not swat flies with steam hammers. > > > What the heck is a steam hammer? :P The

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Decibel!
On Feb 11, 2008, at 11:56 AM, Christopher Browne wrote: It seems better to me to have a suffix that suggests some sort of meaning. I'm not sure of the ideal names, but starting with: .pre-schema, .data, and .post-schema as possibilities seems like a route to get to possibly-better names... +1

Re: [HACKERS] Patch review

2008-02-11 Thread Decibel!
On Feb 9, 2008, at 1:08 AM, Tom Lane wrote: Let's not swat flies with steam hammers. What the heck is a steam hammer? :P -- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give your computer some brain candy! www.distributed.net Team #1828 smime.p7s Description: S/MIME cr

Re: Fwd: [HACKERS] PostgreSQL 8.4 development plan

2008-02-11 Thread Robert Treat
On Monday 11 February 2008 18:18, Andrew Dunstan wrote: > Andy Colson wrote: > >> Would a pre-requisite for any new SCM to be anointed as *the* new SCM > >> that the buildfarm can be reconfigured to run with it? Unless there > >> is an SCM2CVS option available I suppose... how many SCM's support >

Re: Fwd: [HACKERS] PostgreSQL 8.4 development plan

2008-02-11 Thread Andrew Dunstan
Andy Colson wrote: Would a pre-requisite for any new SCM to be anointed as *the* new SCM that the buildfarm can be reconfigured to run with it? Unless there is an SCM2CVS option available I suppose... how many SCM's support such a thing? I dont think the buildfarm needs to require CVS.

Re: Fwd: [HACKERS] PostgreSQL 8.4 development plan

2008-02-11 Thread Christopher Browne
On Feb 11, 2008 9:14 PM, Andy Colson <[EMAIL PROTECTED]> wrote: > I dont think the buildfarm needs to require CVS. The code can be > changed in the buildfarm to just run 'svn up' or 'git up and go' (sorry, > never used git so I had to guess at the command :-) ) right? The relevant commands, for

Re: Fwd: [HACKERS] PostgreSQL 8.4 development plan

2008-02-11 Thread Mark Mielke
Andy Colson wrote: Robert Treat wrote: Would a pre-requisite for any new SCM to be anointed as *the* new SCM that the buildfarm can be reconfigured to run with it? Unless there is an SCM2CVS option available I suppose... how many SCM's support such a thing? I dont think the buildfarm needs

Re: Fwd: [HACKERS] PostgreSQL 8.4 development plan

2008-02-11 Thread Alvaro Herrera
Andy Colson escribió: > Robert Treat wrote: >> Would a pre-requisite for any new SCM to be anointed as *the* new SCM >> that the buildfarm can be reconfigured to run with it? Unless there is >> an SCM2CVS option available I suppose... how many SCM's support such a >> thing? > > I dont think t

Re: Fwd: [HACKERS] PostgreSQL 8.4 development plan

2008-02-11 Thread Andy Colson
Robert Treat wrote: On Saturday 09 February 2008 22:51, Christopher Browne wrote: On Feb 9, 2008 4:58 PM, Jan Wieck <[EMAIL PROTECTED]> wrote: I wonder if the efforts to provide mirrors for many different systems can hurt later down the road. It is pretty obvious that amost every current system

Re: Fwd: [HACKERS] PostgreSQL 8.4 development plan

2008-02-11 Thread Robert Treat
On Saturday 09 February 2008 22:51, Christopher Browne wrote: > On Feb 9, 2008 4:58 PM, Jan Wieck <[EMAIL PROTECTED]> wrote: > > I wonder if the efforts to provide mirrors for many different systems can > > hurt later down the road. It is pretty obvious that amost every current > > system has optio

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Magnus Hagander
Simon Riggs wrote: On Mon, 2008-02-11 at 11:51 -0500, Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: I think this is pretty unwieldy. I agree. Since any multiple-output-file case can't usefully use stdout, I think we should combine the switches and just have one switch that says b

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Simon Riggs
On Mon, 2008-02-11 at 11:51 -0500, Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > I think this is pretty unwieldy. > > I agree. Since any multiple-output-file case can't usefully use stdout, > I think we should combine the switches and just have one switch that > says both that

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Jeff Davis
On Wed, 2008-02-06 at 17:10 +0100, Zeugswetter Andreas ADI SD wrote: > Simon wrote: > > My proposal is to provide two additional modes: > > --schema-pre-load corresponding to (1) above > > --schema-post-load corresponding to (3) above > > Sounds nice. > For a large schema we might rather want one

Re: [HACKERS] Avoid scanning on tape

2008-02-11 Thread Manolo _
Thanks for your reply. I need to read all the run in order to move it to another tape. I suppose the only way to make it is reading the run tuple by tuple and writing them into the destination tape. Regards, Manolo. > To: [EMAIL PROTECTED] > CC: pgsql-

Re: [HACKERS] Avoid scanning on tape

2008-02-11 Thread Tom Lane
Manolo _ <[EMAIL PROTECTED]> writes: > I would like to store the "address on tape" of the first and the last tuple > for the run I'm currently creating on a specific tape. > I need it in order to access directly to those two tuples right after > terminating the creation of that specific run. Why

[HACKERS] Avoid scanning on tape

2008-02-11 Thread Manolo _
Hi. I would like to store the "address on tape" of the first and the last tuple for the run I'm currently creating on a specific tape. I need it in order to access directly to those two tuples right after terminating the creation of that specific run. Of course I could store that address of fi

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Christopher Browne
On Feb 11, 2008 3:41 PM, Simon Riggs <[EMAIL PROTECTED]> wrote: > On Mon, 2008-02-11 at 10:29 -0500, Andrew Dunstan wrote: > > > > Alvaro Herrera wrote: > > > --multidump-prefix=foobar > > > and it creates foobar.1.predata, foobar.2.data, foobar.3.postdata > > > > > > or something like that? The n

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> --pre-schema-file = foo >> --data-file = bar >> --post-schema-file = baz > this looks good. But arguably it's really pre-data and post-data. > pre-schema would be something that comes before the schema, no? Or maybe > it should be {

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Andrew Dunstan
Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: I think this is pretty unwieldy. I agree. Since any multiple-output-file case can't usefully use stdout, I think we should combine the switches and just have one switch that says both that you want separated output and what

Re: [HACKERS] Truncate Triggers

2008-02-11 Thread Claudio Rossi
> There are also some compatibility concerns involved. If we add > grantable privileges for TRUNCATE and/or DDL operations, then GRANT ALL > ON TABLE suddenly conveys a whole lot more privilege than it did before. > This could lead to unpleasant surprises in security-sensitive > operations. One c

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Simon Riggs
On Mon, 2008-02-11 at 18:15 +0100, Magnus Hagander wrote: > Simon, are you planning to do this? (assuming everybody agrees on the > syntax) Yes, will do. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com ---(end of broadcast)--- TIP 7

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > I think this is pretty unwieldy. I agree. Since any multiple-output-file case can't usefully use stdout, I think we should combine the switches and just have one switch that says both that you want separated output and what the target filename is. Thu

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Simon Riggs
On Mon, 2008-02-11 at 10:29 -0500, Andrew Dunstan wrote: > > Alvaro Herrera wrote: > > --multidump-prefix=foobar > > and it creates foobar.1.predata, foobar.2.data, foobar.3.postdata > > > > or something like that? The number would help to sort them > > appropriately, and the string would ensure

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Andrew Dunstan
Simon Riggs wrote: On Mon, 2008-02-11 at 10:29 -0500, Andrew Dunstan wrote: Alvaro Herrera wrote: --multidump-prefix=foobar and it creates foobar.1.predata, foobar.2.data, foobar.3.postdata or something like that? The number would help to sort them appropriately, and the string woul

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Andrew Dunstan
Alvaro Herrera wrote: --multidump-prefix=foobar and it creates foobar.1.predata, foobar.2.data, foobar.3.postdata or something like that? The number would help to sort them appropriately, and the string would ensure that you know what each file is ... perhaps we could have %-escapes in the na

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Alvaro Herrera
Simon Riggs wrote: > What do you think the syntax should be for that? > > If you specify --data-only you get 1 file > If you specify --schema-only you get either 1 or 2 files > and if you don't specify either you get either 1 or 3 files > > How do we name the files? > > --pre-schema-file > --da

Re: [HACKERS] pg_dump additional options for performance

2008-02-11 Thread Simon Riggs
On Fri, 2008-02-08 at 17:01 -0300, Alvaro Herrera wrote: > Decibel! wrote: > > > For that matter, it'd be better if you could just get all 3 files (pre, > > data, post) in one shot with one transaction; that would guarantee you a > > clean dump. > > +1. OK, that seems possible. What do you thin