Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Sim Zacks
I changed it to "where f.commited is not true" and the query now takes 1 second as opposed to 60. (much faster then the 3 seconds it took on 8.0.1, which could also be because of the coalesce there) Is it considered better practice (or more efficient) to always use (x is not or x=value) instead

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Sim Zacks
Thanks for the tuning tips. I'll definitely be taking advantage of them. Problem solved, Tom Lane found that using coalesce in my query the way I did caused it to make a bad estimation, when I changed it the query went from 60 seconds to 1 second. Sim See

[GENERAL] phpPgAdmin-4.1.3 login fail

2008-01-10 Thread Cefull Lo
I just installed phpPgAdmin-4.1.3, when I try to login, it always tell me login fail. I followed the steps in FAQ but still can't login. I'm sure that postgresql is running and accepting tcpip connection (psql -h 192.168.4.4 mydb from other machine is OK), and password is correct. I'm using pos

Re: [GENERAL] Installation problem: failed to initialize lc_messages to ""

2008-01-10 Thread Tom Lane
Stefan Schwarzer <[EMAIL PROTECTED]> writes: >> I'm wondering if some of those files are missing, or the symlinks are >> dangling, on yours. > Hmmm. here is what I have. Looks pretty similar Running out of easy answers, aren't we :-( The next thing I can think of is to run initdb under "

Re: [GENERAL] Installation problem: failed to initialize lc_messages to ""

2008-01-10 Thread Stefan Schwarzer
g42:~ tgl$ ls -lR /usr/share/locale/en_US.UTF-8 total 40 lrwxr-xr-x 1 root wheel 28 Apr 26 2006 LC_COLLATE -> ../ la_LN.US-ASCII/LC_COLLATE lrwxr-xr-x 1 root wheel 17 Apr 26 2006 LC_CTYPE -> ../UTF-8/ LC_CTYPE drwxr-xr-x 3 root wheel 102 Mar 20 2005 LC_MESSAGES lrwxr-xr-x 1

Re: [GENERAL] How to automate password requests?

2008-01-10 Thread Martin Gainty
the name of env var is PGPASSWORD http://www.network-theory.co.uk/docs/postgresql/vol2/EnvironmentVariables1.h tml Viel Gluck Martin- - Original Message - From: "Marten Lehmann" <[EMAIL PROTECTED]> To: Sent: Thursday, January 10, 2008 6:48 PM Subject: Re: [GENERAL] How to automate passwor

Re: [GENERAL] How to automate password requests?

2008-01-10 Thread Andrej Ricnik-Bay
On 11/01/2008, Marten Lehmann <[EMAIL PROTECTED]> wrote: > is there no way to specify the password directly? I don't like to create > a separate file because all config is done in a shell script. I could > set a certain environment variable with the password, but does pgadmin > read a password fro

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Tom Lane
Sim Zacks <[EMAIL PROTECTED]> writes: > I just upgraded my database server from 8.0.1 to 8.2.4 > Most things went very well, but I have a couple of queries that really slowed > down with the new server. The core of the problem seems to be the rowcount misestimation here: > -> Merge Left Jo

Re: [GENERAL] How to automate password requests?

2008-01-10 Thread Marten Lehmann
Hello, TIP 5: don't forget to increase your free space map settings Read about something called the .pgpass file. There's a way to set a file that contains the password (pgAdmin will create one autmoatically) that pgsql will look for before it asks for your password. It's stored in ~/ The s

[GENERAL] Pl/Java broken since Postgresql 8.3-rc1

2008-01-10 Thread Jan Ischebeck
Hi, I'm following the 8.3 beta releases for some time now, mostly using the Win32 with Installer package. 8.3beta3 and 4 have worked perfectly with the provided pljava ddl, just with 8.3-rc1 it doesn't work anymore. i.e. 1. automatic installation of Pl/Java via Installer fails. 2. manual Instal

Re: [GENERAL] 8.3 Beta Incompatible Data Disaster

2008-01-10 Thread Mark Walker
The cvs/svn worked I managed to dump out of beta 1 and now have my database restored in RC1. Many thanks to all. -- Mark Walker

Re: [GENERAL] 8.3 Beta Incompatible Data Disaster

2008-01-10 Thread Shane Ambler
Joshua D. Drake wrote: Mark Walker wrote: What can I do, a dump is impossible because I cannot re-install the version that the database was last used with (it should have been first initialised on 8.2, as I went to the beta to experiment with enum having recently returned from MySQL). Any h

Re: [GENERAL] Importing PostgreSQL data from another database

2008-01-10 Thread Shane Ambler
Erik Jones wrote: On Jan 9, 2008, at 8:06 AM, Ewing, Chris wrote: Hi Everyone, I am trying to import data from a backed up PostgreSQL tablespace. The server which the original data was on has been wiped. 1. I saved the tablespace onto a portable harddrive from the old server. This contain

Re: [GENERAL] ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?

2008-01-10 Thread Clodoaldo
2008/1/10, Tom Lane <[EMAIL PROTECTED]>: > "Scott Marlowe" <[EMAIL PROTECTED]> writes: > > OK, I was looking at the previous thread that you thought had > > disappeared, and with the explain analyze output from 8.3 I noticed > > something odd. > > > For 8.2 you had something like this: > > >

Re: [GENERAL] 8.3beta bug or feature?

2008-01-10 Thread Jeff Davis
On Thu, 2008-01-10 at 16:19 -0300, marcelo Cortez wrote: > > The cast already exist; I think you could change its > > context (from > > "explicit" to "assignment" IIRC). This is, of > > course, not recommended. > > >I've created cast with assignment from in4 to text > > but > select 23

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Isak Hansen
On 1/10/08, Scott Marlowe <[EMAIL PROTECTED]> wrote: > On Jan 10, 2008 12:33 PM, Sim Zacks <[EMAIL PROTECTED]> wrote: > > > Perhaps a suboptimal plan is picked due to configuration issues, e.g. > > > memory constraints? Could you post your postgresql.conf as well? > > > > Below is the postgresql.co

Re: [GENERAL] Postgres and MySQL Rosetta stone??

2008-01-10 Thread Ron Mayer
Scott Marlowe wrote: >> In particular, MySQl seems to have richer string functions to parse >> out sub strings and als trim a string for automatic table insertion >> from long multifield strings. > > Have you read the postgresql manual on string functions? Seriously, > it's easily a match for MyS

Re: [GENERAL] 8.3beta bug or feature?

2008-01-10 Thread marcelo Cortez
Alvaro --- Alvaro Herrera <[EMAIL PROTECTED]> escribió: > marcelo Cortez escribió: > > Pavel > > > > > > --- Pavel Stehule <[EMAIL PROTECTED]> > escribió: > > > > > Hello, > > > > > > it isn't bug. You have to cast to string before. > > > > > > > > > http://www.postgresql.org/docs/8.3/stat

Re: [GENERAL] 8.3beta bug or feature?

2008-01-10 Thread Tom Lane
marcelo Cortez <[EMAIL PROTECTED]> writes: > --- Alvaro Herrera <[EMAIL PROTECTED]> > escribió: >> The operation you show is a pretty stupid thing for >> a mapper to do anyway ... I suggest you fix it. > yeap i know , but it's third part component,fix it is > not an option this time, Well, then

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Scott Marlowe
On Jan 10, 2008 12:33 PM, Sim Zacks <[EMAIL PROTECTED]> wrote: > > Perhaps a suboptimal plan is picked due to configuration issues, e.g. > > memory constraints? Could you post your postgresql.conf as well? > > Below is the postgresql.conf file for 8.2.4. The server has 2 GB of RAM and > it was not

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Sim Zacks
Perhaps a suboptimal plan is picked due to configuration issues, e.g. memory constraints? Could you post your postgresql.conf as well? Below is the postgresql.conf file for 8.2.4. The server has 2 GB of RAM and it was not maxed out when I ran the query. As I mentioned, I tried running both 8.0.

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Sim Zacks
It does contain a lot more loops, but it is the exact same query, so I don't understand why it would use that kind of plan sim Bricklen Anderson wrote: I don't an answer to your question, but an obvious difference is that the "slow" query contains many more loops. (this may already have been

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-10 Thread Ron Mayer
Chris Browne wrote: > [EMAIL PROTECTED] (Zoltan Boszormenyi) writes: >> SELECT COUNT(*) > [Waving hands for a moment] Would what Chris describes below be a good candidate for a pgfoundry project that has functions that'll create the triggers for you? (yeah, I might be volunteering, but would undo

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Scott Marlowe
On Jan 10, 2008 10:50 AM, Sim Zacks <[EMAIL PROTECTED]> wrote: > I meant I did Vacuum Analyze. > In any case, Aside from the vacuum analyze, I also tested it right after a > database restore, so there should be no need for any maintenance features. FYI, a restore does NOT restore the stats, nor d

Re: [GENERAL] ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?

2008-01-10 Thread Greg Smith
On Thu, 10 Jan 2008, Alvaro Herrera wrote: Do tell, what's your wal_buffers setting? Have you tried increasing that? Original post here suggested wal_buffers=512kb in 8.2 and 1024kb in the 8.3 config. Seemed plenty big for this scale of server. -- * Greg Smith [EMAIL PROTECTED] http://www

Re: [GENERAL] ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?

2008-01-10 Thread Alvaro Herrera
Clodoaldo escribió: > If you read that thread you will notice my experience with > xlog_seg_size of 1GB which makes the time goes down to 1,300 sec, > still much more than 8.2. Do tell, what's your wal_buffers setting? Have you tried increasing that? -- Alvaro Herrera

Re: [GENERAL] ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?

2008-01-10 Thread Tom Lane
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > OK, I was looking at the previous thread that you thought had > disappeared, and with the explain analyze output from 8.3 I noticed > something odd. > For 8.2 you had something like this: > QUERY PLAN > --

Re: [GENERAL] ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?

2008-01-10 Thread Clodoaldo
2008/1/10, Scott Marlowe <[EMAIL PROTECTED]>: > On Jan 10, 2008 9:50 AM, Clodoaldo <[EMAIL PROTECTED]> wrote: > > > I have seen performance degradation at every new version since 7.3. > > But now 8.3 is a complete disaster. It could be that my most expensive > > query is just a corner case, but I d

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Isak Hansen
On 1/10/08, Sim Zacks <[EMAIL PROTECTED]> wrote: > I meant I did Vacuum Analyze. > In any case, Aside from the vacuum analyze, I also tested it right after a > database restore, so there should be no need for any maintenance features. > The stats didn't look too far off, no. Perhaps a suboptimal

Re: [GENERAL] Storing and querying boolean fields

2008-01-10 Thread Andrew Sullivan
On Thu, Jan 10, 2008 at 11:08:16AM -0500, Andrew Sullivan wrote: > I mean this sincerely and not snidely: get another job. 7.3.20 was the last Err, 7.3.21, I meant, of course. Sorry. A ---(end of broadcast)--- TIP 4: Have you searched our list a

Re: [GENERAL] How to query for a user-table column name?

2008-01-10 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 10 Jan 2008 10:38:16 -0700 Kevin Kempter <[EMAIL PROTECTED]> wrote: > Hi List; > > I'm researching a db and I want to find samples of some of the data. > I know based on the documentation for the proposed "new" schema that > the db I have acc

Re: [GENERAL] 8.3beta bug or feature?

2008-01-10 Thread marcelo Cortez
Alvaro --- Alvaro Herrera <[EMAIL PROTECTED]> escribió: > marcelo Cortez escribió: > > Pavel > > > > > > --- Pavel Stehule <[EMAIL PROTECTED]> > escribió: > > > > > Hello, > > > > > > it isn't bug. You have to cast to string before. > > > > > > > > > http://www.postgresql.org/docs/8.3/stat

[GENERAL] How to query for a user-table column name?

2008-01-10 Thread Kevin Kempter
Hi List; I'm researching a db and I want to find samples of some of the data. I know based on the documentation for the proposed "new" schema that the db I have access to (the "old" schema) probably has a column in one or more of the user tables called 'region'. I'm looking for a way to query

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Bricklen Anderson
I don't an answer to your question, but an obvious difference is that the "slow" query contains many more loops. (this may already have been noted, I didn't see it posted however). (showing just the loops with more than one loop) -> Index Scan using assemblies_pkey on assemblies a (cost=0.00

Re: [GENERAL] 8.3beta bug or feature?

2008-01-10 Thread Alvaro Herrera
marcelo Cortez escribió: > Pavel > > > --- Pavel Stehule <[EMAIL PROTECTED]> escribió: > > > Hello, > > > > it isn't bug. You have to cast to string before. > > > > > http://www.postgresql.org/docs/8.3/static/release-8-3.html > > E.1.2.1. General > > Yes you are right, but my queries was ge

Re: [GENERAL] 8.3beta bug or feature?

2008-01-10 Thread Erik Jones
On Jan 10, 2008, at 10:47 AM, marcelo Cortez wrote: folks the follow queries work in postgres 8.2 but in 8.3beta don't work SELECT c.* FROM c WHERE c.numero LIKE '1%'; i think automatic conversion of numeber to text is the problem , in 8.3beta don't work numero field is integer type an

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Sim Zacks
Most of the queries that I have tested work on 8.2.4 at least as fast as on 8.0.1. This one has really thrown me for a loop. Sim Could you try 8.3 and see what happens? Keep the emails in case this thread mysteriously disappears. Please stop the histrionics. If your new query is slower,

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Sim Zacks
I meant I did Vacuum Analyze. In any case, Aside from the vacuum analyze, I also tested it right after a database restore, so there should be no need for any maintenance features. Sim Isak Hansen wrote: On 1/10/08, Sim Zacks <[EMAIL PROTECTED]> wrote: I just upgraded my database server from 8

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Scott Marlowe
On Jan 10, 2008 11:12 AM, Clodoaldo <[EMAIL PROTECTED]> wrote: > 2008/1/10, Scott Marlowe <[EMAIL PROTECTED]>: > > > I have seen performance degradation at every new version since 7.3. > > > > Then your experience has been exactly the opposite of mine. > > I suspect some developers here make a livi

Re: [GENERAL] 8.3beta bug or feature?

2008-01-10 Thread marcelo Cortez
Pavel --- Pavel Stehule <[EMAIL PROTECTED]> escribió: > Hello, > > it isn't bug. You have to cast to string before. > > http://www.postgresql.org/docs/8.3/static/release-8-3.html > E.1.2.1. General Yes you are right, but my queries was generated for one mapper ,explicit cast is not an optio

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Clodoaldo
2008/1/10, Scott Marlowe <[EMAIL PROTECTED]>: > On Jan 10, 2008 9:50 AM, Clodoaldo <[EMAIL PROTECTED]> wrote: > > 2008/1/10, Sim Zacks <[EMAIL PROTECTED]>: > > > I just upgraded my database server from 8.0.1 to 8.2.4 > > > Most things went very well, but I have a couple of queries that really > >

Re: [GENERAL] 8.3beta bug or feature?

2008-01-10 Thread Alvaro Herrera
marcelo Cortez escribió: > folks > > the follow queries work in postgres 8.2 but > in 8.3beta don't work > > > SELECT c.* FROM c WHERE c.numero LIKE '1%'; > > i think automatic conversion of numeber to text is > the problem , in 8.3beta don't work > numero field is integer type Thi

Re: [GENERAL] 8.3beta bug or feature?

2008-01-10 Thread Pavel Stehule
Hello, it isn't bug. You have to cast to string before. http://www.postgresql.org/docs/8.3/static/release-8-3.html E.1.2.1. General Regards Pavel Stehule On 10/01/2008, marcelo Cortez <[EMAIL PROTECTED]> wrote: > folks > > the follow queries work in postgres 8.2 but > in 8.3beta don't work

Re: [GENERAL] Installation problem: failed to initialize lc_messages to ""

2008-01-10 Thread Tom Lane
Stefan Schwarzer <[EMAIL PROTECTED]> writes: >> Also, pay attention to the first few lines of initdb output --- >> it will tell you what it thinks it's supposed to use for locale. > It tells me the following: > The files belonging to this database system will be owned by user > "schwarzer". > T

[GENERAL] ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?

2008-01-10 Thread Scott Marlowe
On Jan 10, 2008 9:50 AM, Clodoaldo <[EMAIL PROTECTED]> wrote: > I have seen performance degradation at every new version since 7.3. > But now 8.3 is a complete disaster. It could be that my most expensive > query is just a corner case, but I don't believe it. I posted about it > but the whole thre

[GENERAL] 8.3beta bug or feature?

2008-01-10 Thread marcelo Cortez
folks the follow queries work in postgres 8.2 but in 8.3beta don't work SELECT c.* FROM c WHERE c.numero LIKE '1%'; i think automatic conversion of numeber to text is the problem , in 8.3beta don't work numero field is integer type any ideas? best regards mdc ps:"PostgreSQL 8.3

Re: [GENERAL] 8.3 Beta Incompatible Data Disaster

2008-01-10 Thread Joshua D. Drake
Mark Walker wrote: What can I do, a dump is impossible because I cannot re-install the version that the database was last used with (it should have been first initialised on 8.2, as I went to the beta to experiment with enum having recently returned from MySQL). Any help appreciated, includi

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Scott Marlowe
On Jan 10, 2008 9:50 AM, Clodoaldo <[EMAIL PROTECTED]> wrote: > 2008/1/10, Sim Zacks <[EMAIL PROTECTED]>: > > I just upgraded my database server from 8.0.1 to 8.2.4 > > Most things went very well, but I have a couple of queries that really > > slowed down with the new server. > > On 8.0.1 the quer

Re: [GENERAL] Connect to SQL Server via ODBC from Postgresql

2008-01-10 Thread Joshua D. Drake
Merlin Moncure wrote: On Jan 4, 2008 11:51 AM, Afewtips.com <[EMAIL PROTECTED]> wrote: I do read mentions about dblink connections, but how to install it looks unclear and complicated. small clarification here. dblink is for connecting two postgresql databases together. It is, IMO, neither

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Tom Lane
Clodoaldo <[EMAIL PROTECTED]> writes: > 2008/1/10, Martijn van Oosterhout <[EMAIL PROTECTED]>: >> Huh? It's right there: >> http://archives.postgresql.org/pgsql-general/2008-01/msg00143.php > Where did you get that url? I can't find it here: > http://archives.postgresql.org/pgsql-general/2008-01/t

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Alvaro Herrera
Clodoaldo escribió: > 2008/1/10, Martijn van Oosterhout <[EMAIL PROTECTED]>: > > http://archives.postgresql.org/pgsql-general/2008-01/msg00143.php > > Where did you get that url? I can't find it here: > > http://archives.postgresql.org/pgsql-general/2008-01/threads.php "Next page" -- Alvaro H

Re: [GENERAL] Can I create a TYPE (or DOMAIN) with arguments?

2008-01-10 Thread Tom Lane
Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > On Thu, Jan 10, 2008 at 08:58:07AM -0600, Erik Jones wrote: >> Postgres doesn't support parameterized type declarations directly >> (that I've ever heard of), but you could probably write a function >> that uses EXECUTE to do this. > IIRC 8.

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Raymond O'Donnell
On 10/01/2008 16:11, Clodoaldo wrote: Where did you get that url? I can't find it here: http://archives.postgresql.org/pgsql-general/2008-01/threads.php It's on page 2 of the list.click "Next", and then it's a little over half-way down. Ray. ---

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Clodoaldo
2008/1/10, Martijn van Oosterhout <[EMAIL PROTECTED]>: > On Thu, Jan 10, 2008 at 01:50:42PM -0200, Clodoaldo wrote: > > I posted about it > > but the whole thread disappeared from the archives. It can still be > > found here: > > > > http://archives.free.net.ph/message/20080105.004509.22be255d.es.h

Re: [GENERAL] Storing and querying boolean fields

2008-01-10 Thread Andrew Sullivan
On Wed, Jan 09, 2008 at 06:19:40PM -0500, Brown, Richard wrote: > > - We are using PostgreSQL 7.3.4, and am locked into this version. I would > upgrade if I could, but the decision is not mine. I mean this sincerely and not snidely: get another job. 7.3.20 was the last release in the 7.3 series.

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Martijn van Oosterhout
On Thu, Jan 10, 2008 at 01:50:42PM -0200, Clodoaldo wrote: > I posted about it > but the whole thread disappeared from the archives. It can still be > found here: > > http://archives.free.net.ph/message/20080105.004509.22be255d.es.html Huh? It's right there: http://archives.postgresql.org/pgsql-g

Re: [GENERAL] After Installing a Program I get this error: psql:sql/Pg-database.sql:825: ERROR: language "plpgsql" does not exist

2008-01-10 Thread Adrian Klaver
On Wednesday 09 January 2008 3:02 am, Robin-Vossen wrote: > CREATE INDEX > psql:sql/Pg-database.sql:825: ERROR: language "plpgsql" does not exist > HINT: You need to use "createlang" to load the language into the database. > > > So, I wonder what is the best and quickest way to fix this Flaw? > >

Re: [GENERAL] Setting variables equal to elements from an Array

2008-01-10 Thread Scott Marlowe
On Jan 9, 2008 8:14 AM, cdecarlo <[EMAIL PROTECTED]> wrote: > On Jan 8, 11:35 am, [EMAIL PROTECTED] (Tom Lane) wrote: > > > > The rest of your message suggests that what you want is not that at all, > > but to set the other variable to an array that consists of one or > > moreelements > > from the

Re: [GENERAL] Can I create a TYPE (or DOMAIN) with arguments?

2008-01-10 Thread Martijn van Oosterhout
On Thu, Jan 10, 2008 at 08:58:07AM -0600, Erik Jones wrote: > Postgres doesn't support parameterized type declarations directly > (that I've ever heard of), but you could probably write a function > that uses EXECUTE to do this. IIRC 8.3 will include the user-defined typmod which will allow su

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Sim Zacks
Here are all of the data structures involved in this view. Query Ran: select * from assemblycanbuild CREATE OR REPLACE VIEW assemblycanbuild AS SELECT assembliesbatchid, CASE WHEN min( CASE WHEN (stock::double precision - prioruse - quantity::doubl

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Clodoaldo
2008/1/10, Sim Zacks <[EMAIL PROTECTED]>: > I just upgraded my database server from 8.0.1 to 8.2.4 > Most things went very well, but I have a couple of queries that really slowed > down with the new server. > On 8.0.1 the query took less then 3 seconds to complete. On 8.2.4 the same > query > (I

Re: [GENERAL] Time stamp issue

2008-01-10 Thread Scott Marlowe
On Jan 8, 2008 8:51 AM, <[EMAIL PROTECTED]> wrote: > DELETE from CONCURRENT_USER WHERE (now() - CONCURRENT_USER.TIME_STAMP) > ? > > > > Here the calculated value in '?' is not supported by the postgres as it was > set as a double. > > I tried to cast it to a timestamp by using Timestamp timestamp

Re: [GENERAL] Time stamp issue

2008-01-10 Thread Martijn van Oosterhout
On Tue, Jan 08, 2008 at 08:21:40PM +0530, [EMAIL PROTECTED] wrote: > The query is something like : > > DELETE from CONCURRENT_USER WHERE (now() - CONCURRENT_USER.TIME_STAMP) > > ? > > Here the calculated value in '?' is not supported by the postgres as it > was set as a double. In postgres subtr

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Isak Hansen
On 1/10/08, Sim Zacks <[EMAIL PROTECTED]> wrote: > I just upgraded my database server from 8.0.1 to 8.2.4 > Most things went very well, but I have a couple of queries that really slowed > down with the new server. > On 8.0.1 the query took less then 3 seconds to complete. On 8.2.4 the same > quer

Re: [GENERAL] After Installing a Program I get this error: psql:sql/Pg-database.sql:825: ERROR: language "plpgsql" does not exist

2008-01-10 Thread Albe Laurenz
Robin-Vossen wrote: > Subject: [GENERAL] After Installing a Program I get this > error: psql:sql/Pg-database.sql:825: ERROR: language > "plpgsql" does not exist Define the PL/pgSQL language as described in http://www.postgresql.org/docs/current/static/app-createlang.html Yours, Laurenz Albe -

Re: [GENERAL] postgres 8.3 release date and 2008-01-07 Cumulative Security Update Release

2008-01-10 Thread Scott Marlowe
On Jan 9, 2008 12:12 PM, leonardz <[EMAIL PROTECTED]> wrote: > I am testing postgres 8.3RC1 on some non production data and saw the > above security release. > > I am loathe to patch our 8.0 and 8.1 production servers if 8.3 will be > out by month's end. > > Is there any visibility of a production

Re: [GENERAL] Time stamp issue

2008-01-10 Thread Chandra Sekhar Surapaneni
Difference between timestamps will give you an interval. So the LHS of ">" is interval and hence the RHS should be an interval too. You should not be converting the right hand side value to Timestamp. What is the "double" value you are calculating? Is it in minutes, hours or days? I am not a Java

Re: [GENERAL] performance differences of major versions

2008-01-10 Thread Scott Marlowe
On Jan 10, 2008 2:12 AM, Pavel Stehule <[EMAIL PROTECTED]> wrote: > On 10/01/2008, Matthew T. O'Connor <[EMAIL PROTECTED]> wrote: > > Pavel Stehule wrote: > > > pgbench test - default configuration > > > > > > Verze 7.3.15 7.4.13 8.0.8 8.1.4 8.2.beta1 8.3beta1 > > > tps 311 340 334

Re: [GENERAL] Postgres and MySQL Rosetta stone??

2008-01-10 Thread Scott Marlowe
On Jan 9, 2008 12:19 PM, leonardz <[EMAIL PROTECTED]> wrote: > I am reading through HeadFirst SQL (an OReilly book) which uses > specific MySQLisms in its examples. I use postgres on our databases. > Some examples are easy to work around, some are not . > > Is there a rosetta stone (table of comman

Re: [GENERAL] Can I create a TYPE (or DOMAIN) with arguments?

2008-01-10 Thread Merlin Moncure
On Jan 9, 2008 4:53 AM, R.A. <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to create a composite type with an argument, to create one field > of this type like character varying(x), but I don't know if this can be done > with PostgreSQL. I want something like: > CREATE TYPE mytype AS ( >

Re: [GENERAL] Installation problem: failed to initialize lc_messages to ""

2008-01-10 Thread Stefan Schwarzer
/usr/local/pgsql/bin/initdb -D --locale=en_US.UTF-8 /Users/schwarzer/Documents/data_postgres Dunno if it'll make a difference, but I'd put the "-D" immediately before the path to the data directory. Also, pay attention to the first few lines of initdb output --- it will tell you what it think

Re: [GENERAL] Importing PostgreSQL data from another database

2008-01-10 Thread Erik Jones
On Jan 9, 2008, at 8:06 AM, Ewing, Chris wrote: Hi Everyone, I am trying to import data from a backed up PostgreSQL tablespace. The server which the original data was on has been wiped. 1. I saved the tablespace onto a portable harddrive from the old server. This contains the tablespace

Re: [GENERAL] Postgres and MySQL Rosetta stone??

2008-01-10 Thread Erik Jones
On Jan 9, 2008, at 12:19 PM, leonardz wrote: I am reading through HeadFirst SQL (an OReilly book) which uses specific MySQLisms in its examples. I use postgres on our databases. Some examples are easy to work around, some are not . Is there a rosetta stone (table of commands in one and equival

Re: [GENERAL] Increase the number of concurrent connection

2008-01-10 Thread Gregory Williamson
You may not have issues such that upping the # of users may be a) running you out of postgres allocations (see your documentation for details) ... increasing settings in the postgresql.conf file might help (shared_buffers for instance, and shared_buffers ) or b) not enough shared memory confi

Re: [GENERAL] Installation problem: failed to initialize lc_messages to ""

2008-01-10 Thread Tom Lane
"Raymond O'Donnell" <[EMAIL PROTECTED]> writes: > On 10/01/2008 12:30, Stefan Schwarzer wrote: >> /usr/local/pgsql/bin/initdb -D --locale=en_US.UTF-8 >> /Users/schwarzer/Documents/data_postgres > Dunno if it'll make a difference, but I'd put the "-D" immediately > before the path to the data dir

Re: [GENERAL] Can I create a TYPE (or DOMAIN) with arguments?

2008-01-10 Thread Erik Jones
On Jan 9, 2008, at 3:53 AM, R.A. wrote: Hello, I'm trying to create a composite type with an argument, to create one field of this type like character varying(x), but I don't know if this can be done with PostgreSQL. I want something like: CREATE TYPE mytype AS ( tx character var

Re: [GENERAL] Installation problem: failed to initialize lc_messages to ""

2008-01-10 Thread Stefan Schwarzer
/usr/local/pgsql/bin/initdb -D --locale=en_US.UTF-8 /Users/ schwarzer/Documents/data_postgres Dunno if it'll make a difference, but I'd put the "-D" immediately before the path to the data directory. Thanks for the hint. But unfortunately same error message --

Re: [GENERAL] vacuum, dead rows, usual solutions didn't help

2008-01-10 Thread Erik Jones
On Jan 10, 2008, at 6:01 AM, Simon Riggs wrote: On Thu, 2008-01-10 at 11:18 +0100, Gábor Farkas wrote: Simon Riggs wrote: also, even if it is wrong, can an 'idle-in-transaction' connection that was opened today block the vacuuming of rows that were deleted yesterday? Yes, if the rows w

Re: [GENERAL] 8.3 Beta Incompatible Data Disaster

2008-01-10 Thread Alvaro Herrera
Mark Walker escribió: > Ignoring the warnings not to use a beta product on a production database I > had been running 8.3beta1. When I saw that it had hit 8.3RC1 I decided to > upgrade and folowing the usual data compatibility within major versions I > did not do a pg_dump, in fact my last dump was

Re: [GENERAL] Connect to SQL Server via ODBC from Postgresql

2008-01-10 Thread Merlin Moncure
On Jan 4, 2008 11:51 AM, Afewtips.com <[EMAIL PROTECTED]> wrote: > > I do read mentions about dblink connections, but how to install it > > looks unclear and complicated. > > small clarification here. dblink is for connecting two postgresql databases together. It is, IMO, neither unclear nor com

Re: [GENERAL] After Installing a Program I get this error: psql:sql/Pg-database.sql:825: ERROR: language "plpgsql" does not exist

2008-01-10 Thread Magnus Hagander
On Wed, Jan 09, 2008 at 03:02:53AM -0800, Robin-Vossen wrote: > > So I thought lets add the language I miss. > doing: > createlang -d ledgersmb -U ledgersmb plpgsql > I keep getting: > createlang: language installation failed: ERROR: permission denied for > language c You must run creatlang with

Re: [GENERAL] 8.3 Beta Incompatible Data Disaster

2008-01-10 Thread Magnus Hagander
On Thu, Jan 10, 2008 at 11:36:04AM +, Mark Walker wrote: > Ignoring the warnings not to use a beta product on a production database I > had been running 8.3beta1. When I saw that it had hit 8.3RC1 I decided to > upgrade and folowing the usual data compatibility within major versions I > did not

Re: [GENERAL] Setting variables equal to elements from an Array

2008-01-10 Thread Martijn van Oosterhout
On Wed, Jan 09, 2008 at 06:14:10AM -0800, cdecarlo wrote: > Maybe, an example will help you understand what I want to do: > > Let myArray be {{1,2,3},{4,5,6},{7,8,9}} and suppose the element I'm > looking for has, in it's first index, an even number. I would loop > through myArray looking at the f

[GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Sim Zacks
I just upgraded my database server from 8.0.1 to 8.2.4 Most things went very well, but I have a couple of queries that really slowed down with the new server. On 8.0.1 the query took less then 3 seconds to complete. On 8.2.4 the same query (I vacuumed the database before running the query) takes

[GENERAL] After Installing a Program I get this error: psql:sql/Pg-database.sql:825: ERROR: language "plpgsql" does not exist

2008-01-10 Thread Robin-Vossen
CREATE INDEX psql:sql/Pg-database.sql:825: ERROR: language "plpgsql" does not exist HINT: You need to use "createlang" to load the language into the database. psql:sql/Pg-database.sql:828: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:sql/Pg-database.s

Re: [GENERAL] Installation problem: failed to initialize lc_messages to ""

2008-01-10 Thread Raymond O'Donnell
On 10/01/2008 12:30, Stefan Schwarzer wrote: /usr/local/pgsql/bin/initdb -D --locale=en_US.UTF-8 /Users/schwarzer/Documents/data_postgres Dunno if it'll make a difference, but I'd put the "-D" immediately before the path to the data directory. Ray.

[GENERAL] Time stamp issue

2008-01-10 Thread kapil.munish
Hi Everyone, I have a table named concurrent_user which has a column time_stamp. The column stores the timestamp for the latest entered record. My query finds the difference of the timestamp from the current time, if the value is larger than 5 minutes then the latest entered record in the tab

Re: [GENERAL] Experiences with extensibility

2008-01-10 Thread Guido Neitzer
On 09.01.2008, at 13:51, Martin wrote: I've been working with FrontBase a lot lately and I wouldn't say anything about it qualifies as "incredibly easy" and reliable it is not. We had never ever any reliability issues with FrontBase as long as didn't try to insert garbage. It really doesn't

[GENERAL] postgres 8.3 release date and 2008-01-07 Cumulative Security Update Release

2008-01-10 Thread leonardz
I am testing postgres 8.3RC1 on some non production data and saw the above security release. I am loathe to patch our 8.0 and 8.1 production servers if 8.3 will be out by month's end. Is there any visibility of a production 8.3 release date? ---(end of broadcast)-

[GENERAL] Storing and querying boolean fields

2008-01-10 Thread Brown, Richard
Hi All, First, some background: - We are using PostgreSQL 7.3.4, and am locked into this version. I would upgrade if I could, but the decision is not mine. - The table referred to below is 120+ million rows, and has a width of 27 columns (15 smallints, 5 integers, 4 dates, 1 integer[], 1 single c

[GENERAL] Postgres and MySQL Rosetta stone??

2008-01-10 Thread leonardz
I am reading through HeadFirst SQL (an OReilly book) which uses specific MySQLisms in its examples. I use postgres on our databases. Some examples are easy to work around, some are not . Is there a rosetta stone (table of commands in one and equivalents inthe other) available? In particular, MySQ

Re: [GENERAL] Setting variables equal to elements from an Array

2008-01-10 Thread cdecarlo
On Jan 8, 11:35 am, [EMAIL PROTECTED] (Tom Lane) wrote: > cdecarlo <[EMAIL PROTECTED]> writes: > > I'm new to pl/pgsql and postgres and I need some help with a part of > > my function. In the function I loop through a multidemensional array > > ( [n][3] ), once, while inside the loop, I find the i

[GENERAL] Importing PostgreSQL data from another database

2008-01-10 Thread Ewing, Chris
Hi Everyone, I am trying to import data from a backed up PostgreSQL tablespace. The server which the original data was on has been wiped. 1. I saved the tablespace onto a portable harddrive from the old server. This contains the tablespace folder (with PG_VERSION file) and a folder named 225809.

Re: [GENERAL] Cannot connect to PgPool

2008-01-10 Thread Christopher Siwy
I had this exact problem. I had to in fact compile the pgpool-II source code rather than yum install pgpool-II. On Jan 8, 2008 9:55 AM, Tatsuo Ishii <[EMAIL PROTECTED]> wrote: > Can you provide more info please? > > - pgpool version(I assume it's pgpool-II since you use 3 PostgreSQL > servers)

Re: [GENERAL] Increase the number of concurrent connection

2008-01-10 Thread dformenton
I changed max_connection from 100 to 200 and stop the service. If I try to start again the service does no start. What is the max number of connections I can hope to obtain without recompile the kernel of Fedora 8? Thank you. Domenico Formenton A. Kretschmer wrote: > > am Thu, dem 10.01.200

[GENERAL] 8.3 Beta Incompatible Data Disaster

2008-01-10 Thread Mark Walker
Ignoring the warnings not to use a beta product on a production database I had been running 8.3beta1. When I saw that it had hit 8.3RC1 I decided to upgrade and folowing the usual data compatibility within major versions I did not do a pg_dump, in fact my last dump was when I loaded the beta on 10t

[GENERAL] Can I create a TYPE (or DOMAIN) with arguments?

2008-01-10 Thread R.A.
Hello, I'm trying to create a composite type with an argument, to create one field of this type like character varying(x), but I don't know if this can be done with PostgreSQL. I want something like: CREATE TYPE mytype AS ( tx character varying(x), t2nd integer ); I need to l

Re: [GENERAL] Query to get column-names in table via PG tables?

2008-01-10 Thread Merlin Moncure
On Jan 10, 2008 1:37 AM, Ken Johanson <[EMAIL PROTECTED]> wrote: > Hi all, > > I am looking for expertise on how to program the equivalent to this > query, but using the pg_catalog tables, which I understand have fewer > security restrictions than information_schema in some cases: > > SELECT column

Re: [GENERAL] Format Float numbers

2008-01-10 Thread Albe Laurenz
> I want format a column in select result: > > 1.1 => 1.10 > > Any idea? Try the to_date() function like SELECT to_char(1.1, '0.99'); Yours, Laurenz Albe ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropria

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-10 Thread Alvaro Herrera
Harald Fuchs wrote: > In article <[EMAIL PROTECTED]>, > Chris Browne <[EMAIL PROTECTED]> writes: > > > There may be a further optimization to be had by doing a > > per-statement trigger that counts the number of INSERTs/DELETEs done, > > so that inserting 30 tuples (in the table being tracked) lea

  1   2   >