Strange transaction-id behaviour? (was Re: [GENERAL] Two updates problem)

2005-06-09 Thread Richard Huxton
Yuri B. Lukyanov wrote: I have table: and function: But this thing don't work: UPDATE test SET text2='test' WHERE id = (SELECT test1()); (rows affected: 0) Why? There is two updates on the same row, but work only first update (in the function). Maybe it's bug? Hmm - PostgreSQL has a tran

Re: [GENERAL] how do you set foriegn keys in pgaccess?

2005-06-09 Thread Changyu Dong
Hi, Jeremy, Have you tried PGadminIII? It's much easier to use. To input a script, you can use psql psql -h HOSTNAME -d DANAME -f FILENAME -U USERNAME Changyu --- jeremy ` <[EMAIL PROTECTED]> wrote: > I am a bit of a newbie to postgres, but I managed to > install 8.0.4 on my > windows box and i

Re: [GENERAL] how do you set foriegn keys in pgaccess?

2005-06-09 Thread Richard Huxton
jeremy ` wrote: I am a bit of a newbie to postgres, but I managed to install 8.0.4 on my windows box and it mostly appears to be working fine; I can set a primary key constraint, but when i try to set the foreign key it requires a 'reference' - but there is nothing there to chose from. I also

Re: [GENERAL] Backup Compatibility between minor versions.

2005-06-09 Thread Howard Cole
Thanks for the response Doug. I am frightened to upgrade the linux machine to 8.0.3 at the moment because the server is live and I want to make sure that 8.0.3 will fix it. I have extracted the relevant parts of the restore as follows: 1. The restore command pg_restore.exe -i -h 10.202.6.1

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Marco Colombo
On Wed, 2005-06-08 at 10:00 -0700, dong changyu wrote: > Hi, > A possible countermeasure on Windows platform, > inspired by Magnus.Thanks ;) > First we remove the passphrase from the key file, > making it plain. > Windows provides a feature "encrypted file system", > provide transparent encryption/

Re: [GENERAL] Backup Compatibility between minor versions.

2005-06-09 Thread Howard Cole
Interestingly, this is the latest tsearch2 function that ships with 8.0.3 - note the slightly different syntax to the one below. It looks like the compatibility issue is caused by this. I shall try and modify the function in the 8.0.1 database, then try and restore it to a 8.0.3 server and see w

Re: [GENERAL] postgres and ggobi/xgvis

2005-06-09 Thread Sean Davis
On Jun 8, 2005, at 7:39 PM, Hrishikesh Deshmukh wrote: Hi All, How easy or difficult is it to get ggobi/xgvis working with postgresql?! Is it possible to write a query and send the output straight to ggobi/xgvis without much work? Any pointers. I would think that you would need to constru

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Changyu Dong
Hi Marco, The problem I described in the first mail is that because of some unknown reasons, if you save the server.key file with a passphrase, you will be prompted to enter the passphrase every time you start the server AND a client make a connection, which actually forbids us to use a passphrase

[GENERAL] Postgre "idle" process using 100% CPU

2005-06-09 Thread Jernej Kos
Hi, i am using postgresql version 8.0.1 on Gentoo Linux and from time to time a postgres process that is marked as idle - "postgres: user db IP(34079) idle" - starts using 100% CPU. There is nothing in the logs, so i don't have a clue what could be the problem. Regards, Jernej Kos. -- Jernej

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Marco Colombo
On Thu, 2005-06-09 at 02:59 -0700, Changyu Dong wrote: > Hi Marco, > The problem I described in the first mail is that > because of some unknown reasons, if you save the > server.key file with a passphrase, you will be > prompted to enter the passphrase every time you start > the server AND a clien

[GENERAL] Pb with linked tables on PG8

2005-06-09 Thread Ets ROLLAND
Hello !   I have an Access database using linked tables on PG 8.0.3 (on Windows 2003 server).I use pgODBC 8.00.01.01. Some tables appear like deleted !In Access I see : Categ : Tablevt_cat            vt_libcat #Supprimé    #Supprimé #Supprimé    #Supprimé #Supprimé    #Supprimé #Supprimé   

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Magnus Hagander
> The EFS encryption as you described it adds nothing but a > false sense of security (and the ability to use some more > buzzwords). The level of protection is just the same of a > Unix file with the right permissions. > The key point here is that both the 'postgres' user and > 'administrator

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Changyu Dong
--- Marco Colombo <[EMAIL PROTECTED]> wrote: > As long as the 'postgres' user has access to it w/o > typing any password, > that's only a detail. Unless someone physically > steals your disk, the > fact it's stored encrypted is irrelevant. The only > thing that matters is > who can access it, and

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Changyu Dong
Hi Magnus, You are right. My description is based on windows 2000 which is the weakest one. Have the recovery key only available off-line is a good practice. And if you don't want recovery agent, backup the user's private key is also appropriate. It can be done without effort. You don't need an arm

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Marco Colombo
On Thu, 2005-06-09 at 13:54 +0200, Magnus Hagander wrote: > > The EFS encryption as you described it adds nothing but a > > false sense of security (and the ability to use some more > > buzzwords). The level of protection is just the same of a > > Unix file with the right permissions. > > The ke

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Magnus Hagander
> > > The EFS encryption as you described it adds nothing but a false > > > sense of security (and the ability to use some more > buzzwords). The > > > level of protection is just the same of a Unix file with > the right > > > permissions. > > > The key point here is that both the 'postgres' u

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Changyu Dong
I don't know, I just tested it on win32. Changyu --- Magnus Hagander <[EMAIL PROTECTED]> wrote: > (BTW, am I correct in reading this as a problem that > only appears on > win32, because of the exec nature of the backend, > right? Or does it show > up on Unix as well?) > > //Magnus >

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Marco Colombo
On Thu, 2005-06-09 at 05:21 -0700, Changyu Dong wrote: > --- Marco Colombo <[EMAIL PROTECTED]> wrote: > > > As long as the 'postgres' user has access to it w/o > > typing any password, > > that's only a detail. Unless someone physically > > steals your disk, the > > fact it's stored encrypted is i

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Marco Colombo
On Thu, 2005-06-09 at 15:04 +0200, Magnus Hagander wrote: [...] > Yes, that is correct - runas is similar to su. But in order to do > "runas", you need the service accounts password. Once you are "root" on > a unix system, you can do "su - user" *without* the password. That's a > big difference. >

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Magnus Hagander
> > Yes, that is correct - runas is similar to su. But in order to do > > "runas", you need the service accounts password. Once you > are "root" > > on a unix system, you can do "su - user" *without* the password. > > That's a big difference. > > (You can also use the postgres accounts smartcar

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Changyu Dong
--- Marco Colombo <[EMAIL PROTECTED]> wrote: > Either the Windows backup contains the private key > of the user or not. > > If not, the backup is incomplete and useless (to get > the file contents). > You may get other files from it, but that's not the > point. You may just > not include the key

Re: [GENERAL] deadlocks in multiple-triggers environment

2005-06-09 Thread Alvaro Herrera
On Wed, Jun 08, 2005 at 05:45:45PM +0200, hubert depesz lubaczewski wrote: > hi > i have a stituation a situation where i have multiple tables, and multiple > triggers on all of them. > at least 1 or 2 triggers on at lease 4 different tables does updates to main > cache table. Do say, are there

[GENERAL] Propogating conditions into a query

2005-06-09 Thread Phil Endecott
Dear All, I have a number of complex views for which the typical use is to select exactly one row by id, e.g. "select * from V where id=nnn". Some of these selects run orders of magnitude faster than others. Looking at the output of "explain analyse" it seems that in the fast cases the "id

Re: [GENERAL] deadlocks in multiple-triggers environment

2005-06-09 Thread Csaba Nagy
[snip] > Do say, are there foreign keys on those tables? > > If there are, that may explain the deadlocks. This is a known problem, > fixed in the development version, for which there is no complete Wow, that's a good news :-) Time to drop that nasty patch we'r

[GENERAL] "returning" in postgresql request

2005-06-09 Thread GIROIRE, Nicolas (COFRAMI)
Hi, I try to deploy an Application with Oracle Database to a solution with postgresql. the Oracle system exists and we use a request which return an int in a variable nb by "returning nb_lock into nb" UPDATE xdb_ancestors_lock SET nb_lock=nb_lock+1 WHERE doc_id=?

Re: [GENERAL] deadlocks in multiple-triggers environment

2005-06-09 Thread Alvaro Herrera
On Thu, Jun 09, 2005 at 04:26:44PM +0200, Csaba Nagy wrote: > [snip] > > Do say, are there foreign keys on those tables? > > > > If there are, that may explain the deadlocks. This is a known problem, > > fixed in the development version, for which there is no complete >

Re: [GENERAL] "returning" in postgresql request

2005-06-09 Thread Richard Huxton
GIROIRE, Nicolas (COFRAMI) wrote: Hi, I try to deploy an Application with Oracle Database to a solution with postgresql. the Oracle system exists and we use a request which return an int in a variable nb by "returning nb_lock into nb" UPDATE xdb_ancestors_lock SET nb_lock=nb_lock+1 WHERE doc_id

Re: [GENERAL] vulnerability/SSL

2005-06-09 Thread Marco Colombo
On Thu, 2005-06-09 at 15:53 +0200, Magnus Hagander wrote: [...] > > > I guess we could read in the password ourselves and drop it in our > > > shared memory segment to pass to subprocesses - though that > > means they > > > can get to the password easier as well. Assuming OpenSSL > > has the AP

Re: [HACKERS] Strange transaction-id behaviour? (was Re: [GENERAL] Two updates problem)

2005-06-09 Thread Tom Lane
Richard Huxton writes: > I'm not sure it's sensible to have the update in the WHERE clause - I > don't know that you can depend on how many times that function will be > called. It's absolutely not very sensible to do that ... note the warnings in http://www.postgresql.org/docs/8.0/static/sql-e

[GENERAL] Starting PostgreSQL on WinXP is not working

2005-06-09 Thread Rodrigo Katsumoto Sakai
Hi, i'm working with PostgreSQL for a long time (about three years), but always on Linux box. But recently, I had to intall PostgreSQL on a WinXP machine! The installation works fine, although the starting service did not works in the finalization of the installation! The installation was do

Re: [GENERAL] Backup Compatibility between minor versions.

2005-06-09 Thread Tom Lane
Howard Cole <[EMAIL PROTECTED]> writes: > Interestingly, this is the latest tsearch2 function that ships with > 8.0.3 - note the slightly different syntax to the one below. It looks > like the compatibility issue is caused by this. Read the 8.0.3 release notes ... http://www.postgresql.org/docs/

Re: [GENERAL] "returning" in postgresql request

2005-06-09 Thread Tino Wildenhain
Am Donnerstag, den 09.06.2005, 16:30 +0200 schrieb GIROIRE, Nicolas (COFRAMI): > Hi, > > I try to deploy an Application with Oracle Database to a solution with > postgresql. > the Oracle system exists and we use a request which return an int in a > variable nb by "returning nb_

Re: [GENERAL] Postgre "idle" process using 100% CPU

2005-06-09 Thread Tom Lane
Jernej Kos <[EMAIL PROTECTED]> writes: > i am using postgresql version 8.0.1 on Gentoo Linux and from time to time a > postgres process that is marked as idle - "postgres: user db IP(34079) idle" > - starts using 100% CPU. There is nothing in the logs, so i don't have a clue > what could be the p

Re: [GENERAL] database auto-commit

2005-06-09 Thread Jim C. Nasby
IIRC there is no autocommit in postgresql itself, so the autocommit is probably from whatever connection library/method you're using. Note that PSQL does have an autocommit option, but I don't see how that would affect this case. On Tue, May 31, 2005 at 03:12:26PM +0200, FERREIRA, William (COFRAMI

Re: [GENERAL] "returning" in postgresql request

2005-06-09 Thread Matt Miller
> > deploy an Application with Oracle Database to a solution with postgresql. > > ... > > UPDATE xdb_ancestors_lock SET nb_lock=nb_lock+1 WHERE doc_id=? AND > > > ele_id=? returning nb_lock INTO nb; > Looks like you really want: > > UPDATE xdb_ancestors_lock SET nb_lock=nextval('nb_lock_sequence'

Re: [GENERAL] Propogating conditions into a query

2005-06-09 Thread Tom Lane
Phil Endecott <[EMAIL PROTECTED]> writes: > I have a number of complex views for which the typical use is to select > exactly one row by id, e.g. "select * from V where id=nnn". Some of > these selects run orders of magnitude faster than others. Looking at > the output of "explain analyse" it

Re: [GENERAL] Starting PostgreSQL on WinXP is not working

2005-06-09 Thread Magnus Hagander
> Hi, i'm working with PostgreSQL for a long time (about > three years), but always on Linux box. But recently, I had to > intall PostgreSQL on a WinXP machine! > The installation works fine, although the starting service > did not works in the finalization of the installation! The > instal

Re: [GENERAL] Pb with linked tables on PG8

2005-06-09 Thread Zlatko Matic
Hello.   I have experoenced the same problem. It seems to be common problem with Access connectiong to ODBC data source. It seems that Access has some problems to determine primary key... You should not use textual fields as primary key. Insted, add some bigserial (integer autoincrement field

Re: [GENERAL] postgreSQL 7.3.8, pg_dump not able to find large o

2005-06-09 Thread Ron Snyder
> We've been getting errors similar to the following (the specific large > object that is "missing" is different every time) during our nightly > pg_dump: > > pg_dump: dumpBlobs(): could not open large object: ERROR: > inv_open: large > object 48217896 not found > After doing a bunch of testin

Re: [GENERAL] Propogating conditions into a query

2005-06-09 Thread Phil Endecott
Tom Lane wrote: Phil Endecott <[EMAIL PROTECTED]> writes: I have a number of complex views for which the typical use is to select exactly one row by id, e.g. "select * from V where id=nnn". Some of these selects run orders of magnitude faster than others. Looking at the output of "explain

Re: [GENERAL] Propogating conditions into a query

2005-06-09 Thread Tom Lane
Phil Endecott <[EMAIL PROTECTED]> writes: > I don't see anything in there about LEFT OUTER JOIN though. Any ideas? Oh, I missed that part of your message. Hmm, I think the issue is that in >> D join (M join G on (M.g=G.id)) on (D.id=M.b) where D.id=nnn the planner deduces M.b=nnn by transitivi

Re: [GENERAL] Propogating conditions into a query

2005-06-09 Thread Phil Endecott
Tom Lane wrote: Phil Endecott <[EMAIL PROTECTED]> writes: D join (M join G on (M.g=G.id)) on (D.id=M.b) where D.id=nnn A possible workaround is to generate your query like D left join (M join G on (M.g=G.id)) on (D.id=M.b AND M.b=nnn) where D.id=nnn I don't suppose it would work if I did

Re: [GENERAL] postgreSQL 7.3.8, pg_dump not able to find large o

2005-06-09 Thread Tom Lane
Ron Snyder <[EMAIL PROTECTED]> writes: > We've been getting errors similar to the following (the specific large > object that is "missing" is different every time) during our nightly > pg_dump: > > pg_dump: dumpBlobs(): could not open large object: ERROR: > inv_open: large object 48217896 not fo

Re: [GENERAL] postgreSQL 7.3.8, pg_dump not able to find large o

2005-06-09 Thread Joshua D. Drake
Nope. I'm feeling a strong urge to go fix it for 8.1 though. The question from the previous mail still stands: would anybody's applications be broken if we change the MVCC behavior of large objects? Could you provide an instance where it might? I had always assumed (I know, never assume) th

Re: [GENERAL] postgreSQL 7.3.8, pg_dump not able to find large o

2005-06-09 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: >> The question from the previous mail still stands: would anybody's >> applications be broken if we change the MVCC behavior of large objects? > Could you provide an instance where it might? I had always assumed (I > know, never assume) that large ob

Re: [GENERAL] Postgresql fails to start? (Update)

2005-06-09 Thread Dianne Yumul
Just an update . . . I tried upgrading kernel to 2.6.11.11 (kernel.org) but was unsuccessful (due to i2c and gcc 4.0 issue). So I settled for the one on the fedora development repository. But that didn't help, upgraded other stuff too like selinux-policy-targeted and initscripts. Beginning to pull

[GENERAL] monetary data

2005-06-09 Thread John Browne
I was just curious how you guys implement storage / calculation of monetary data in postgresql. The docs say to use the numeric data type, but I'm curious what precision is typically defined for storing monetary data in the numeric data type. Thanks for any info... ---(en

Re: [GENERAL] monetary data

2005-06-09 Thread Joshua D. Drake
John Browne wrote: I was just curious how you guys implement storage / calculation of monetary data in postgresql. The docs say to use the numeric data type, but I'm curious what precision is typically defined for storing monetary data in the numeric data type. We use numeric(10,2) Sincerely

Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
> It's curious to me that the following is fine: > > beginning of output= > test=# select '1001'::bit varying; > varbit > > 1001 > (1 row) > end of output Okay, I guess I'm not so curious, thanks to http://www.post

[GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
I'm trying to interpret strings of Y's and N's as bit vectors and perform bitwise ops on them. It's not working: beginning of output= test=# select version (); version

Re: [GENERAL] Postgresql fails to start? (Update)

2005-06-09 Thread Tom Lane
Dianne Yumul <[EMAIL PROTECTED]> writes: > # chcon -u system_u -r object_r -t postgresql_log_t > /home/postgres/pgstartup.log > chcon: can't apply partial context to unlabeled file > /home/postgres/pgstartup.log > [but this works:] > # chcon system_u:object_r:postgresql_log_t /home/postgres/pgsta

[GENERAL] Version Control?

2005-06-09 Thread Peter Fein
Hi- Any general tips on using version control (CVS, SVN) while doing database design? My thought was to do a text-mode dump (including populated code tables) from PGAdmin. How do people do this? -- Peter Fein [EMAIL PROTECTED] 773-575-0694 Basically, if you're n

Re: **SPAM** Re: [GENERAL] Pb with linked tables on PG8

2005-06-09 Thread Ets ROLLAND
Many thanks for this very usefull information.   Luc - Original Message - From: Zlatko Matic To: Ets ROLLAND ; pgsql-general@postgresql.org Sent: Thursday, June 09, 2005 6:52 PM Subject: **SPAM** Re: [GENERAL] Pb with linked tables on PG8 Hello.   I h

Re: [GENERAL] Version Control?

2005-06-09 Thread elein
Up until the database goes into production, keep files: schema.sql (table creation), views.sql, functions.sql triggers.sql trigfunctions.sql in cvs/svn. Afterwards any changes to the schema are in change01.sql, change02.sql,... The change scripts hold the alter table statements for schema changes

Re: [GENERAL] Version Control?

2005-06-09 Thread Russ Brown
Peter Fein wrote: Hi- Any general tips on using version control (CVS, SVN) while doing database design? My thought was to do a text-mode dump (including populated code tables) from PGAdmin. How do people do this? Currently we just store a dump of the data structure. However, what I think is

Re: [GENERAL] Version Control?

2005-06-09 Thread John Browne
How would you handle the migration of the data with these user scripts? Dump it to a temp table? On 6/9/05, elein <[EMAIL PROTECTED]> wrote: > Up until the database goes into production, > keep files: schema.sql (table creation), > views.sql, functions.sql triggers.sql trigfunctions.sql > in cvs

Re: [GENERAL] Version Control?

2005-06-09 Thread Thomas Kellerer
Russ Brown wrote on 09.06.2005 23:12: Currently we just store a dump of the data structure. However, what I think is really needed is a specialist diff tool which works out the commands needed to move from one schema to another. That would be *extremely* useful, but would also probably require

Re: [GENERAL] CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT

2005-06-09 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Tue, May 31, 2005 at 03:43:56PM -0400, Tom Lane wrote: >> OK, next question: is this a bug fix we should back-patch into 7.4, >> or just change it in HEAD? > I guess apply only in HEAD, and provide the patch for MLikharev so he > can solve his immedi

Re: [GENERAL] CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT

2005-06-09 Thread MLikharev
Thanks. Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Tue, May 31, 2005 at 03:43:56PM -0400, Tom Lane wrote: >> OK, next question: is this a bug fix we should back-patch into 7.4, >> or just change it in HEAD? > I guess apply only in HEAD, and provide the patch for MLikharev so he > can solve h

Re: [GENERAL] Version Control?

2005-06-09 Thread Russ Brown
Thomas Kellerer wrote: Russ Brown wrote on 09.06.2005 23:12: Currently we just store a dump of the data structure. However, what I think is really needed is a specialist diff tool which works out the commands needed to move from one schema to another. That would be *extremely* useful, but wou

[GENERAL] Now() function

2005-06-09 Thread David Siebert
Windows XP SP2 Java SDK V1.4.2_08 JDBC 7.4.216.jdbc3 When I use now in an update it is giving me a very odd value in the database. This is what PGAdminIII shows 2005-06-09 13:52:46.259715 I am not expecting the decimal seconds. I am getting an out of range error in java when I read the column.

[GENERAL] Pushing limit into subqueries of a union

2005-06-09 Thread Phil Endecott
Dear Experts, Here is another "how can I rewrite this to go faster" idea. I have two tables T1 and T2 and a view V that is the UNION ALL of T1 and T2. The tables have an editdate field, and I want to get the n most recently changed rows: select * from V order by editdate desc limit 40; T

Re: [GENERAL] Version Control?

2005-06-09 Thread Tony Caduto
PG Lightning Admin also has function version control. http://www.amsoftwaredesign.com Russ Brown wrote: Thomas Kellerer wrote: Russ Brown wrote on 09.06.2005 23:12: Currently we just store a dump of the data structure. However, what I think is really needed is a specialist diff tool which

Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
On Thu, 2005-06-09 at 20:05 +, Matt Miller wrote: > I'm trying to interpret strings of Y's and N's as bit vectors and > perform bitwise ops on them. Well, I ended up writing a bunch of code to accomplish what I initially thought would be just some casting and bitops on built-in types. I reall

Re: [GENERAL] Version Control?

2005-06-09 Thread Steve Atkins
On Thu, Jun 09, 2005 at 10:12:25PM +0100, Russ Brown wrote: > Peter Fein wrote: > >Hi- > > > >Any general tips on using version control (CVS, SVN) while doing > >database design? My thought was to do a text-mode dump (including > >populated code tables) from PGAdmin. > > > >How do people do this? >

Re: [GENERAL] Version Control?

2005-06-09 Thread elein
On Thu, Jun 09, 2005 at 04:16:46PM -0500, John Browne wrote: > How would you handle the migration of the data with these user > scripts? Dump it to a temp table? > If your scripts are correct, you should be able to load your base scripts and apply each change script in order and have the result

Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Alvaro Herrera
On Thu, Jun 09, 2005 at 10:18:27PM +, Matt Miller wrote: > On Thu, 2005-06-09 at 20:05 +, Matt Miller wrote: > > I'm trying to interpret strings of Y's and N's as bit vectors and > > perform bitwise ops on them. > > Well, I ended up writing a bunch of code to accomplish what I initially >

Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
> > I ended up writing a bunch of code to accomplish what I initially > > thought would be just some casting and bitops on built-in types. > I imagine you could have done something involving textout() and > varbit_in(), like > > alvherre=# select varbit_in(textout(translate('YYNY', 'YN', '10')),

Re: [GENERAL] Pushing limit into subqueries of a union

2005-06-09 Thread Tom Lane
Phil Endecott <[EMAIL PROTECTED]> writes: > I presume that PostgreSQL doesn't try to push the limit clause into the > subqueries of a UNION ALL in this way. I believe it is safe, isn't it? Hmm. You don't actually want to push the LIMIT as such into the subplan --- that would create an extra lev

[GENERAL] Setting all elements in an Bool[] array to the same value

2005-06-09 Thread Otto Blomqvist
Hello ! Is there any way to set all elements in a long boolean array (bool[]) to the same value ? update testbool set "all elements" = false;or so ? ;) Any ideas ? Thanks /Otto Blomqvist ---(end of broadcast)--- TIP 8: explain analyze is

[GENERAL] INHERITS and planning

2005-06-09 Thread Edmund Dengler
Greetings! Is there an issue when a large number of INHERITS tables exist for planning? We have 2 base tables, and use INHERITS to partition the data. When we get around 2000-2200 sub-tables (approx 1000-1100 per base table), planning a SELECT statement on the base table (ie, to search all sub-ta

Re: [GENERAL] Now() function

2005-06-09 Thread Michael Glaesemann
On Jun 10, 2005, at 7:07 AM, David Siebert wrote: When I use now in an update it is giving me a very odd value in the database. This is what PGAdminIII shows 2005-06-09 13:52:46.259715 I am not expecting the decimal seconds. I am getting an out of range error in java when I read the column.

Re: [GENERAL] Now() function

2005-06-09 Thread Michael Glaesemann
On Jun 10, 2005, at 11:37 AM, Michael Glaesemann wrote: A short term solution would be to update the column using something like update foo set foo_timestamp = date_trunc(foo_timestamp). Sorry. That isn't clear (or correct!) Complete example at the bottom of the email. UPDATE foo SET fo

Re: [GENERAL] CPU-intensive autovacuuming

2005-06-09 Thread Thomas F. O'Connell
Phil, If you complete this patch, I'm very interested to see it. I think I'm the person Matthew is talking about who inserted a sleep value. Because of the sheer number of tables involved, even small values of sleep caused pg_autovacuum to iterate too slowly over its table lists to be of u

[GENERAL] Wrong select results after transaction (HELP PLS)

2005-06-09 Thread go
Hi, Help me please to resolve the problem: Just After commiting transaction - writing ,say 90 rows,I try to select the same 90 rows - and get wrong set of rows (some of them: 1-2 replaced by unknown data). But after 10-20 seconds the result of selecting the neccessary 90 rows return right result.

Re: [GENERAL] CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT

2005-06-09 Thread Ilja Golshtein
Hi! >Done. Here is the patch (against CVS tip, but it should apply with >some fuzz in 8.0 or 7.4). Is this patch about CREATE TEMP TABLE AS SELECT only, or about SELECT INTO TEMP TABLE as well? -- Best regards Ilja Golshtein ---(end of broadcast)---

Re: [GENERAL] INHERITS and planning

2005-06-09 Thread Tom Lane
Edmund Dengler <[EMAIL PROTECTED]> writes: > Is there an issue when a large number of INHERITS tables exist for > planning? Well, there are a number of issues whenever a single query references a whole lot of tables in any fashion. It's only with Neil Conway's rewrite of the List package in 8.0 t

[GENERAL] IMPORTANT NOTIFICATION

2005-06-09 Thread frederic . germaneau
URL doesn't work! I confirm my account -- Réacheminé par Frederic Germaneau/FR/BULL sur 10/06/2005 08:09 --- [EMAIL PROTECTED]@postgresql.org sur 09/06/2005 00:01:26 Envoyé par : [EMAIL PROTECTED] Pour : pgsql-general@postgresql.org cc : Obje

Re: [GENERAL] Version Control?

2005-06-09 Thread Russ Brown
On 6/9/05, elein <[EMAIL PROTECTED]> wrote: > On Thu, Jun 09, 2005 at 04:16:46PM -0500, John Browne wrote: > > How would you handle the migration of the data with these user > > scripts? Dump it to a temp table? > > > > If your scripts are correct, you should be able to load > your base scripts a