[GENERAL] Why grantor is owner in this case?

2009-12-25 Thread donniehan
Hi guys, I have a question about the grantor. Why the grantor is owner in the following case ? I think it should be postgres(dba). postgres=# create user u1; CREATE ROLE postgres=# create user u2; CREATE ROLE postgres=# set session authorization u1; SET postgres=> create table u1_tb1(a int); C

Re: [GENERAL] Updating from 8.2 to 8.4

2009-12-25 Thread Mark Morgan Lloyd
Adrian Klaver wrote: On Thursday 24 December 2009 11:20:35 am Mark Morgan Lloyd wrote: I was hoping to finally get the servers updated from 8.2 to 8.4 over the festive season, but by now I think I've left things too tight. Is it necessary to update the (Windows) ODBC driver as well? I've got a

Re: [GENERAL] Session based transaction!!

2009-12-25 Thread Bill Moran
S Arvind wrote: > > Hi Everyone, > > In a web application running in Tomcat and Postgres 8.3 as DB, i need to > know whether my given task is feasible or not. >All the db operation which is done by that web application must > be rollback at the end(session dies) and the DB data must b

[GENERAL] Out of space making backup

2009-12-25 Thread Farhan Malik
When making a backup of my database I run out of space.  I tell it to put the backup file on my K: drive, which has tons of free space, but during the backup postgresql creates a temporary folder on my C: Drive where it initially writes data.  I don't have enough space on my C: drive for all the da

Re: [GENERAL] date_trunc on date is immutable?

2009-12-25 Thread Greg Stark
On Fri, Dec 25, 2009 at 1:58 AM, Scott Marlowe wrote: > Isn't it the client timezone and not the system timezone that actually > sets the tz the tstz is set to on retrieval? It's the GUC: stark=> set timezone = 'America/Los_Angeles'; SET stark=> select now(); now --

Re: [GENERAL] Session based transaction!!

2009-12-25 Thread John R Pierce
S Arvind wrote: Hi Everyone, In a web application running in Tomcat and Postgres 8.3 as DB, i need to know whether my given task is feasible or not. All the db operation which is done by that web application must be rollback at the end(session dies) and the DB data must be same as

Re: [GENERAL] Out of space making backup

2009-12-25 Thread John R Pierce
Farhan Malik wrote: When making a backup of my database I run out of space. I tell it to put the backup file on my K: drive, which has tons of free space, but during the backup postgresql creates a temporary folder on my C: Drive where it initially writes data. I don't have enough space on my C

Re: [GENERAL] date_trunc on date is immutable?

2009-12-25 Thread Tom Lane
Greg Stark writes: > On Fri, Dec 25, 2009 at 12:56 AM, Scott Marlowe > wrote: >> On Thu, Dec 24, 2009 at 4:36 PM, Kian Wright >> wrote: >>> I'm trying to create an index on the month and year of a date field (in >>> 8.3), and I'm getting the "functions in index expression must be marked >>> IMM

Re: [GENERAL] Why grantor is owner in this case?

2009-12-25 Thread Tom Lane
"donniehan" writes: > I have a question about the grantor. Why the grantor is owner in the > following case ? I think it should be postgres(dba). Grants done by a superuser on an object he doesn't own are treated as being done by the object owner instead. Otherwise you end up with grants that

Re: [GENERAL] Out of space making backup

2009-12-25 Thread Tom Lane
Farhan Malik writes: > When making a backup of my database I run out of space.  I tell it to > put the backup file on my K: drive, which has tons of free space, but > during the backup postgresql creates a temporary folder on my C: Drive > where it initially writes data.  I don't have enough space

Re: [GENERAL] Out of space making backup

2009-12-25 Thread Farhan Malik
> Reading between the lines, I suspect you are trying to use 'tar' output > format, which does have a need to make temp files that can be large. > If I guessed right, I'd suggest using 'custom' format instead.  There > really is no advantage to tar format, and several disadvantages besides > this o

Re: [GENERAL] Out of space making backup

2009-12-25 Thread Brian Modra
2009/12/25 Farhan Malik : >> Reading between the lines, I suspect you are trying to use 'tar' output >> format, which does have a need to make temp files that can be large. >> If I guessed right, I'd suggest using 'custom' format instead.  There >> really is no advantage to tar format, and several

Re: [GENERAL] Updating from 8.2 to 8.4

2009-12-25 Thread Adrian Klaver
On Friday 25 December 2009 5:06:28 am Mark Morgan Lloyd wrote: > Adrian Klaver wrote: > > On Thursday 24 December 2009 11:20:35 am Mark Morgan Lloyd wrote: > >> I was hoping to finally get the servers updated from 8.2 to 8.4 over the > >> festive season, but by now I think I've left things too tigh

Re: [GENERAL] Out of space making backup

2009-12-25 Thread John R Pierce
Farhan Malik wrote: That sounds right. The error I get from the software is 2009/12/25 10:21:40.812: [1EA8][ThreadBackupRestore] Restore Error: pg_dump: [tar archiver] could not write to output file: No space left on device Is there a way to have postgre put those large temp files on a diff

Re: [GENERAL] Updating from 8.2 to 8.4

2009-12-25 Thread Mark Morgan Lloyd
Adrian Klaver wrote: although I don't know why it didn't bite on 8.2 unless it's specifically when 64-bit timestamps are processed. You might want to confirm your 8.4 installation is using integer datetimes as there is some variability in its useage among packagers. Follow this thread for one

Re: [GENERAL] Out of space making backup

2009-12-25 Thread Farhan Malik
Thanks. Changing the environmental variable has solved that issue. It ultimately required 13GB of free space to create a 2GB backup file. On Fri, Dec 25, 2009 at 1:19 PM, John R Pierce wrote: > Farhan Malik wrote: >> >> That sounds right.  The error I get from the software is 2009/12/25 >> 10:21

[GENERAL] Out of space making backup

2009-12-25 Thread Farhan Malik
When making a backup of my database I run out of space. I tell it to put the backup file on my K: drive, which has tons of free space, but during the backup postgresql creates a temporary folder on my C: Drive where it initially writes data. I don't have enough space on my C: drive for all the da

[GENERAL] Finding the bin path

2009-12-25 Thread Rob Jaeger
Is there a command or reliable method of finding the location of the PostgreSQL bin path? I'm currently using "SHOW hba_file;" which gives me the data path. For default installs I can find the bin relative to this, but it fails under custom installs. My apologies if this has been addressed before

Re: [GENERAL] Finding the bin path

2009-12-25 Thread John R Pierce
Rob Jaeger wrote: Is there a command or reliable method of finding the location of the PostgreSQL bin path? I'm currently using "SHOW hba_file;" which gives me the data path. For default installs I can find the bin relative to this, but it fails under custom installs. My apologies if this h

Re: [GENERAL] Finding the bin path

2009-12-25 Thread Guillaume Lelarge
Le 25/12/2009 18:02, Rob Jaeger a écrit : > Is there a command or reliable method of finding the location of the > PostgreSQL bin path? > Nope. > I'm currently using "SHOW hba_file;" which gives me the data path. For > default installs I can find the bin relative to this, but it fails under > cu

Re: [GENERAL] Finding the bin path

2009-12-25 Thread Tom Lane
Rob Jaeger writes: > Is there a command or reliable method of finding the location of the > PostgreSQL bin path? pg_config --bindir Although I think not all packagers install this in the base package, which might limit its usefulness. regards, tom lane -- Sent via pgsq

Re: [GENERAL] Updating from 8.2 to 8.4

2009-12-25 Thread Adrian Klaver
On Friday 25 December 2009 10:27:09 am Mark Morgan Lloyd wrote: > Adrian Klaver wrote: > >> although I don't know why it didn't bite on 8.2 unless it's specifically > >> when 64-bit timestamps are processed. > > > > You might want to confirm your 8.4 installation is using integer > > datetimes as t

[GENERAL] Clarification regarding array columns usage?

2009-12-25 Thread m. hvostinski
Hi, I would appreciate if someone could clarify the aspects of using array columns. We need to store up to ten related integer values per row and currently it is implemented as a varchar column that holds a string that is concatenated by a trigger function. Something like this: FOR var IN (SELEC

Re: [GENERAL] Out of space making backup

2009-12-25 Thread Craig Ringer
On 26/12/2009 12:44 AM, Brian Modra wrote: use select pg_start_backup('some-name') (in psql logged in a postres) then start a tar of /var/lib/pgsql/data/, to stdout and pipe this to tar on another server using ssh This won't work on a Windows machine. Windows does not permit files that are op

Re: [GENERAL] Clarification regarding array columns usage?

2009-12-25 Thread Randal L. Schwartz
> "m" == m hvostinski writes: m> I would appreciate if someone could clarify the aspects of using array m> columns. In general, bad idea. m> We need to store up to ten related integer values per row and currently it m> is implemented as a varchar column that holds a string that is concatena

Re: [GENERAL] Clarification regarding array columns usage?

2009-12-25 Thread Pavel Stehule
Hello 2009/12/25 m. hvostinski : > Hi, > > I would appreciate if someone could clarify the aspects of using array > columns. > a) don't use array column as storage for list of foreign keys. It is one basic and significant rule. Planner and optimizer cannot work well with keys stored in arrays. So