Re: [GENERAL] How to convert rows into HTML columns?

2007-10-04 Thread A. Kretschmer
am Fri, dem 05.10.2007, um 8:20:32 +0200 mailte Stefan Schwarzer folgendes: > Before I was used that the yearly values were all to be found in a > single SQL row; now for each year of each country I have a separate > row. How do I convert that into a single (HTML) row again? You can use cond

[GENERAL] How to convert rows into HTML columns?

2007-10-04 Thread Stefan Schwarzer
Hi there, I feel like a brain-washed person being slowly re-socialized. After changing from an Excel-like database design to a "central table" one (see here: http://archives.postgresql.org/pgsql-general/2007-10/ msg00132.php ) I am struggling with multiple problems... One is now the HTML t

Re: [GENERAL] Error while database creation

2007-10-04 Thread A. Kretschmer
am Fri, dem 05.10.2007, um 11:43:09 +0530 mailte Ashish Karalkar folgendes: > Hello All, > > I am getting following error when trying to create new database. > > > createdb: database creation failed: ERROR: could not create directory "base/ > 1923827": No space left on device > can anybody

Re: [GENERAL] Error while database creation

2007-10-04 Thread Christian Rengstl
I guess that "No space left on device" explains a lot, i.e. there is no space left on your hard drive/partition. Christian Rengstl M.A. Klinik und Poliklinik für Innere Medizin II Kardiologie - Forschung Universitätsklinikum Regensburg B3 1.388 Franz-Josef-Strauss-Allee 11 93053 Regensburg Tel.:

[GENERAL] Error while database creation

2007-10-04 Thread Ashish Karalkar
Hello All, I am getting following error when trying to create new database. createdb: database creation failed: ERROR: could not create directory "base/1923827": No space left on device can anybody please tell me what is going wrong. Thanks in advance. With regards Ashish

Re: [GENERAL] Windows vista

2007-10-04 Thread Andrei Kovalevski
Hi! PostgreSQL win32 port works pretty well on Vista. You can find latest 8.2 binaries there: http://www.postgresql.org/ftp/binary/v8.2.5/win32/ Use installer from postgresql-8.2.5-1.zip

Re: [GENERAL] SLOW Remote Connection to PostgreSQL Database

2007-10-04 Thread Chris
Matt White wrote: Hello, I am running a Rails app on server1 that connects to dbserver where the database is. There is another server, server2, that connects to dbserver quickly and returns quickly no matter how high dbserver's load is. Doing "psql -h dbserver.domain.com database username" from

Re: [GENERAL] Importing MySQL dump into PostgreSQL 8.2

2007-10-04 Thread Chris
Jeff Lanzarotta wrote: Hello, I have a MySQL dump file that I would like to import into our PostgreSQL 8.2 database. Is there a way to do this? You'll need to convert the table definitions then the data. For example, mysql has int(11) columns, postgres only has int columns. I usually conver

Re: [GENERAL] It's time to support GRANT SELECT,UPDATE,...,...,... ON database.* to username

2007-10-04 Thread Michael Glaesemann
On Oct 2, 2007, at 22:58 , [EMAIL PROTECTED] wrote: And that's the only thing I apologize for. It's good advocacy. Just curious, but are you and MrKrinkle <[EMAIL PROTECTED]> the same individual? I just ask because your posting style is similar. Michael Glaesemann grzm seespotcode net

Re: [GENERAL] Poor performance with ON DELETE CASCADE

2007-10-04 Thread Conal
On Sep 27, 4:27 am, [EMAIL PROTECTED] (Tom Lane) wrote: > Conal <[EMAIL PROTECTED]> writes: > > I have a database schema which has a "central" table with several > > others depending on it. The dependent tables all have foreign key > > constraints with ON DELETE CASCADE so that I can remove tuples

Re: [GENERAL] Find out encoding of data

2007-10-04 Thread joynes
Yeah you're right. I didnt test it with any special characters. It works when I do :) Thx a lot! -- View this message in context: http://www.nabble.com/Find-out-encoding-of-data-tf4549554.html#a13014617 Sent from the PostgreSQL - general mailing list archive at Nabble.com.

[GENERAL] SLOW Remote Connection to PostgreSQL Database

2007-10-04 Thread Matt White
Hello, I am running a Rails app on server1 that connects to dbserver where the database is. There is another server, server2, that connects to dbserver quickly and returns quickly no matter how high dbserver's load is. Doing "psql -h dbserver.domain.com database username" from server1 times out ev

Re: [GENERAL] It's time to support GRANT SELECT,UPDATE,...,...,... ON database.* to username

2007-10-04 Thread dterrors
On Oct 2, 3:14 pm, [EMAIL PROTECTED] (Jeff Davis) wrote: > A "wakeup call" might be justified if: > (1) it's on -advocacy (after all, the primary threat in his email is > that we would lose users...) > (2) it's good advocacy, i.e. not rude, insulting, demanding, or vulgar > Good point, I apologiz

[GENERAL] Windows vista

2007-10-04 Thread hafordjr
Where do I get the link needed to install postgres on windows vista and do I install it. Please help I need it for a school project Sent from my Verizon Wireless BlackBerry ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ign

Re: [GENERAL] It's time to support GRANT SELECT,UPDATE,...,...,... ON database.* to username

2007-10-04 Thread dterrors
On Oct 2, 12:06 pm, Chris Browne <[EMAIL PROTECTED]> wrote: > The trouble is that "GRANT ON *.*" seems to be a lazy shortcut for > someone who *thinks* they're trying to secure their system, but that > would rather say "well, everything" as opposed to looking at things > properly. > > That is, if y

[GENERAL] Partitioned tables, rules, triggers

2007-10-04 Thread Goboxe
Hi, I have two questions on the above: 1. I found in some postings recommended to use triggers instead of rules. Is this documented somewhere? 2. When using trigger, any examples on how to update the trigger dynamically when tables are added or deleted from the partitioned? Thanks, Amin -

Re: [GENERAL] Auto-partitioning?

2007-10-04 Thread Goboxe
"use consumer called table_dispatcher"... could you elaborate this further on how to do this? Thanks, G On Aug 22, 3:27 pm, [EMAIL PROTECTED] ("Asko Oja") wrote: > Hi > > Just a hint. > We do this auto-partitioning with PgQ. Instead of writing records into table > we push them into queue and use

Re: [GENERAL] Partitioned table limitation

2007-10-04 Thread Goboxe
On Oct 3, 4:00 am, [EMAIL PROTECTED] ("paul rivers") wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:pgsql-general- > > [EMAIL PROTECTED] On Behalf Of Goboxe > > Sent: Monday, October 01, 2007 11:26 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [GENERAL]Partitionedtable li

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Tom Lane
I wrote: > Bottom line seems to be that we should run through the in_info_list and > force Vars mentioned therein to be propagated up at least to the > "righthand" join level, ensuring they're available if we decide to > unique-ify above that point. I've committed a patch along these lines --- if

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Moran wrote: > In response to "Scott Marlowe" <[EMAIL PROTECTED]>: > The process is, web interface -> request export -> get an estimate > on completion time -> come back later and check the status -> download > if complete. > > It's difficult (m

Re: [GENERAL] time penalties on triggers?

2007-10-04 Thread Scott Marlowe
On 10/4/07, Jan Theodore Galkowski <[EMAIL PROTECTED]> wrote: > Does anyone know, or can anyone point to information about how much > triggers penalize inserts in PG tables? I'm getting a report that it is > substantial, and before I investigate more. Using your DDL, with slight variations, I cam

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Bill Moran
In response to "Scott Marlowe" <[EMAIL PROTECTED]>: > On 10/4/07, Mike Ginsburg <[EMAIL PROTECTED]> wrote: > > > export it. Memory limit is a major concern, but the query for one row > > returns a result set too large and PHP fails. > > If this is true, and one single db row makes php exceed it

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Scott Marlowe
On 10/4/07, Mike Ginsburg <[EMAIL PROTECTED]> wrote: > This is for the export only. Since it is an export of ~50,000 registrants, > it takes some time to process. We also have load balanced web servers, so > unless I want to create identical processes on all webservers, or write some > crazy sc

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Mike Ginsburg
Scott Marlowe wrote: On 10/4/07, Mike Ginsburg <[EMAIL PROTECTED]> wrote: export it. Memory limit is a major concern, but the query for one row returns a result set too large and PHP fails. If this is true, and one single db row makes php exceed its memory limit just by returning it,

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Scott Marlowe
On 10/4/07, Mike Ginsburg <[EMAIL PROTECTED]> wrote: > export it. Memory limit is a major concern, but the query for one row > returns a result set too large and PHP fails. If this is true, and one single db row makes php exceed its memory limit just by returning it, you've done something very v

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Alvaro Herrera
Scott Marlowe escribió: > On 10/4/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > Mike Ginsburg wrote: > > > Hello, > > > I am working on a personnel registry that has upwards of 50,000 > > > registrants. Currently I am working on an export module that will create > > > a > > > CSV from multip

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Scott Marlowe
On 10/4/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Mike Ginsburg wrote: > > Hello, > > I am working on a personnel registry that has upwards of 50,000 > > registrants. Currently I am working on an export module that will create a > > CSV from multiple tables. I have managed to keep the scri

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread André Volpato
Alvaro Herrera escreveu: Mike Ginsburg wrote: Hello, I am working on a personnel registry that has upwards of 50,000 registrants. Currently I am working on an export module that will create a CSV from multiple tables. I have managed to keep the script (PHP) under the memory l

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread André Volpato
Mike Ginsburg escreveu: André Volpato wrote: Mike Ginsburg escreveu: Hello, I am working on a personnel registry that has upwards of 50,000 registrants. Currently I am working on an export module that will create a CSV from multiple tables. I have managed to keep the script (PHP) under th

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Alvaro Herrera
Mike Ginsburg wrote: > Hello, > I am working on a personnel registry that has upwards of 50,000 > registrants. Currently I am working on an export module that will create a > CSV from multiple tables. I have managed to keep the script (PHP) under > the memory limit when creating and inserting

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread Mike Ginsburg
André Volpato wrote: Mike Ginsburg escreveu: Hello, I am working on a personnel registry that has upwards of 50,000 registrants. Currently I am working on an export module that will create a CSV from multiple tables. I have managed to keep the script (PHP) under the memory limit okay...

Re: [GENERAL] Design Question (Time Series Data)

2007-10-04 Thread Ted Byers
--- Michael Glaesemann <[EMAIL PROTECTED]> wrote: > > On Oct 4, 2007, at 9:30 , Ted Byers wrote: > > > I do not know if PostgreSQL, or any other RDBMS, > > includes the ability to call on software such as > "R" > > See PL/R: > > http://www.joeconway.com/plr/ > Thanks. Good to know. Ted --

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread André Volpato
Mike Ginsburg escreveu: Hello, I am working on a personnel registry that has upwards of 50,000 registrants. Currently I am working on an export module that will create a CSV from multiple tables. I have managed to keep the script (PHP) under the memory limit okay... some info needed here.

[GENERAL] Large Result and Memory Limit

2007-10-04 Thread Mike Ginsburg
Hello, I am working on a personnel registry that has upwards of 50,000 registrants. Currently I am working on an export module that will create a CSV from multiple tables. I have managed to keep the script (PHP) under the memory limit when creating and inserting the CSV into the database.

[GENERAL] time penalties on triggers?

2007-10-04 Thread Jan Theodore Galkowski
Does anyone know, or can anyone point to information about how much triggers penalize inserts in PG tables? I'm getting a report that it is substantial, and before I investigate more. The triggers in question look like: # # CREATE OR REPLACE FUNCTION touch_lasttouched() RETURNS TRIGGER AS $touch_

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Michael Glaesemann
On Oct 4, 2007, at 12:23 , Geoffrey wrote: Rodrigo De León wrote: On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: I know how to use google, I'm looking for recommendations. What an ass. If you found my reply to be lacking, you can say so without being rude... Stating the obvious google

[GENERAL] Problem with connectivity

2007-10-04 Thread Andy Glew
Please help.. I have hit a bit of a brick wall with this. I have a problem concerning connecting to my database. I want to log webserver transactions into a postgresql db. For development the webserver is my local pc and the postgresql db is setup on a server, both accessable through the comp

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Geoffrey
Rodrigo De León wrote: On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: Stating the obvious google search to me is just as rude. I was looking for recommendations based on others' experiences. That was not my intention, so I'm sorry if you felt that way. My apologies then. -- Until later, G

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Miroslav Šulc
Just an explanation why I create such a weird WHERE clause. I have a form definition that should on initialization load no records in list, that's the reason why 'false' is there. But every query goes through layer that adds extra clause to the original one to allow access only to records the user

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Geoffrey
[EMAIL PROTECTED] wrote: Scott Marlowe wrote: On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: Anyone have a recommendation for a good sql tutorial? Looking for a book, but online would be useful as well. I'd recommend The Art of SQL and Joel Celko's books. None are online that I know of, but

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Rodrigo De León
On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: > Stating the obvious google search to me is just as rude. I was looking > for recommendations based on others' experiences. That was not my intention, so I'm sorry if you felt that way. Peace. ---(end of broadcast)

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Ken . Colson
Scott Marlowe wrote: > On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: >> Anyone have a recommendation for a good sql tutorial? Looking for a >> book, but online would be useful as well. > > I'd recommend The Art of SQL and Joel Celko's books. None are online > that I know of, but they're afford

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> such a hokey query (how many applications really write "WHERE false"?), > Granted this isn't WHERE FALSE, but I certainly see WHERE TRUE all the > time in similar scenarios and I have seen WHERE FALSE. In what context? Either "W

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Lane wrote: > =?ISO-8859-2?Q?Miroslav_=A9ulc?= <[EMAIL PROTECTED]> writes: >> Here is the complete dump and the query. In my case the bug is >> reproducible using it. > In a perfect world we'd not have this problem because > const-simplification w

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Geoffrey
Scott Marlowe wrote: On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: Anyone have a recommendation for a good sql tutorial? Looking for a book, but online would be useful as well. I'd recommend The Art of SQL and Joel Celko's books. None are online that I know of, but they're affordable and q

Re: [GENERAL] PITR Recovery and out-of-sync indexes

2007-10-04 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > On Thu, 2007-10-04 at 09:21 -0600, Brian Wipf wrote: >> The Apple Xserve is easy to maintain and rock solid reliable. If it >> had better performance to its Fibre Channel RAID array, it would be a >> better main server too. The Linux box is a better per

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Geoffrey
Rodrigo De León wrote: On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: I know how to use google, I'm looking for recommendations. What an ass. If you found my reply to be lacking, you can say so without being rude... Stating the obvious google search to me is just as rude. I was looking f

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Geoffrey
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/04/07 11:06, Geoffrey wrote: Ron Johnson wrote: On 10/04/07 10:28, Geoffrey wrote: Anyone have a recommendation for a good sql tutorial? Looking for a book, but online would be useful as well. This is for a financial use

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Tom Lane
=?ISO-8859-2?Q?Miroslav_=A9ulc?= <[EMAIL PROTECTED]> writes: > Here is the complete dump and the query. In my case the bug is > reproducible using it. > # SELECT Invoice.* FROM Invoice WHERE false AND InvoiceGroupId IN (SELECT > InvoiceGroup.Id FROM InvoiceGroup INNER JOIN PartnerBranch ON > Invoi

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Rodrigo De León
On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: > I know how to use google, I'm looking for recommendations. What an ass. If you found my reply to be lacking, you can say so without being rude... ---(end of broadcast)--- TIP 2: Don't 'kill -9' the

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Dave Page
> --- Original Message --- > From: Ron Johnson <[EMAIL PROTECTED]> > To: pgsql-general@postgresql.org > Sent: 04/10/07, 17:22:16 > Subject: Re: [GENERAL] good sql tutorial > > You'll see his SQL, squeal like a girl and then forbid him from ever > touching the database again. I'm just sa

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Scott Marlowe
On 10/4/07, Ron Johnson <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 10/04/07 11:06, Geoffrey wrote: > > Ron Johnson wrote: > >> > >> On 10/04/07 10:28, Geoffrey wrote: > >>> Anyone have a recommendation for a good sql tutorial? Looking for a > >>> book, but

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/04/07 11:06, Geoffrey wrote: > Ron Johnson wrote: >> >> On 10/04/07 10:28, Geoffrey wrote: >>> Anyone have a recommendation for a good sql tutorial? Looking for a >>> book, but online would be useful as well. >>> >>> This is for a financial user

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Scott Marlowe
On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: > Anyone have a recommendation for a good sql tutorial? Looking for a > book, but online would be useful as well. I'd recommend The Art of SQL and Joel Celko's books. None are online that I know of, but they're affordable and quite informative. --

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Geoffrey
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/04/07 10:28, Geoffrey wrote: Anyone have a recommendation for a good sql tutorial? Looking for a book, but online would be useful as well. This is for a financial user who will need to have an understanding of sql in order

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Geoffrey
Rodrigo De León wrote: On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: Anyone have a recommendation for a good sql tutorial? Looking for a book, but online would be useful as well. This is for a financial user who will need to have an understanding of sql in order to generate reports with a re

Re: [GENERAL] Design Question (Time Series Data)

2007-10-04 Thread Andreas Strasser
Ted Byers wrote: If you really have such a disparity among your series, then it is a mistake to blend them into a single table. You really need to spend more time analyzing what the data means. If one data set is comprised of the daily close price of a suite of stocks or mutual funds, then it

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/04/07 10:28, Geoffrey wrote: > Anyone have a recommendation for a good sql tutorial? Looking for a > book, but online would be useful as well. > > This is for a financial user who will need to have an understanding of > sql in order to generate

Re: [GENERAL] good sql tutorial

2007-10-04 Thread Rodrigo De León
On 10/4/07, Geoffrey <[EMAIL PROTECTED]> wrote: > Anyone have a recommendation for a good sql tutorial? Looking for a > book, but online would be useful as well. > > This is for a financial user who will need to have an understanding of > sql in order to generate reports with a report writer like

Re: [GENERAL] PITR Recovery and out-of-sync indexes

2007-10-04 Thread Simon Riggs
On Thu, 2007-10-04 at 09:21 -0600, Brian Wipf wrote: > On 4-Oct-07, at 8:14 AM, Simon Riggs wrote: > > The First Commandment is Make Thy Servers Identical, which applies to > > OS, OS version, disk layouts/config as well as basic hardware. If > > they're not then you're going to get some strange re

[GENERAL] good sql tutorial

2007-10-04 Thread Geoffrey
Anyone have a recommendation for a good sql tutorial? Looking for a book, but online would be useful as well. This is for a financial user who will need to have an understanding of sql in order to generate reports with a report writer like openrpt. Thanks for any suggestions. -- Until later

Re: [GENERAL] PITR Recovery and out-of-sync indexes

2007-10-04 Thread Brian Wipf
On 4-Oct-07, at 8:14 AM, Simon Riggs wrote: The First Commandment is Make Thy Servers Identical, which applies to OS, OS version, disk layouts/config as well as basic hardware. If they're not then you're going to get some strange results. Other than the corrupt indexes on varchar columns, there

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Miroslav Šulc
Tom Lane napsal(a): > Alvaro Herrera <[EMAIL PROTECTED]> writes: > >> Miroslav Ĺ ulc wrote: >> >>> I just verified that the problem is in pg 8.2.5 too. >>> > > >> Can you show us the table definitions? >> > > We need a *complete* test case, ie, a SQL script to provoke the err

Re: [GENERAL] multiple row insertion

2007-10-04 Thread André Volpato
Alvaro Herrera escreveu: test tester escribió: On 10/4/07, test tester <[EMAIL PROTECTED]> wrote: i have version 8.1 and i want to know how to insert multiple rows in this version. Upgrade. Use COPY instead. Put you data into a var, and perf

Re: [GENERAL] Design Question (Time Series Data)

2007-10-04 Thread Michael Glaesemann
On Oct 4, 2007, at 9:30 , Ted Byers wrote: I do not know if PostgreSQL, or any other RDBMS, includes the ability to call on software such as "R" See PL/R: http://www.joeconway.com/plr/ Michael Glaesemann grzm seespotcode net ---(end of broadcast)--

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Miroslav Šulc
Tom Lane napsal(a): > Alvaro Herrera <[EMAIL PROTECTED]> writes: > >> Miroslav Ĺ ulc wrote: >> >>> I just verified that the problem is in pg 8.2.5 too. >>> > > >> Can you show us the table definitions? >> > > We need a *complete* test case, ie, a SQL script to provoke the err

Re: [GENERAL] Design Question (Time Series Data)

2007-10-04 Thread Ted Byers
--- Andreas Strasser <[EMAIL PROTECTED]> wrote: > Hello, > > i'm currently designing an application that will > retrieve economic data > (mainly time series)from different sources and > distribute it to clients. > It is supposed to manage around 20.000 different > series with differing > numb

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Miroslav Å ulc wrote: >> I just verified that the problem is in pg 8.2.5 too. > Can you show us the table definitions? We need a *complete* test case, ie, a SQL script to provoke the error starting from an empty database. regar

Re: [GENERAL] multiple row insertion

2007-10-04 Thread Alvaro Herrera
test tester escribió: > On 10/4/07, test tester <[EMAIL PROTECTED]> wrote: > > > i have version 8.1 and i want to know how to insert multiple rows in this > > version. Upgrade. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt,

Re: [GENERAL] Postgres8: subselect and optimizer/planner

2007-10-04 Thread Tom Lane
Erwin Moller <[EMAIL PROTECTED]> writes: > SELECT U.userid, U.username, > (SELECT G.groupname FROM tblgroup WHERE (G.userid=U.userid)) AS ingroup > FROM tbluser WHERE (bla..bla...); > Will this approach be slower than a regular join? Probably; it's unlikely to be faster anyway. The best plan you

Re: [GENERAL] multiple row insertion

2007-10-04 Thread A. Kretschmer
am Thu, dem 04.10.2007, um 18:47:01 +0500 mailte test tester folgendes: > > > On 10/4/07, test tester <[EMAIL PROTECTED]> wrote: > > i have version 8.1 and i want to know how to insert multiple rows in this > version. Please no silly top post. You can insert multiple values with one i

Re: [GENERAL] PITR Recovery and out-of-sync indexes

2007-10-04 Thread Simon Riggs
On Tue, 2007-10-02 at 17:11 -0600, Brian Wipf wrote: > Both servers have identical Intel processors and both are running 64- > bit PostgreSQL 8.2.4. The original server is running 64-bit openSUSE > 10.2 (Linux 2.6.18.2-34-default #1 SMP Mon Jul 16 01:16:32 GMT 2007 > x86_64 x86_64 x86_64 GNU/

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Miroslav Šulc
Here they are: CREATE TABLE invoice ( id int4 NOT NULL, description text NOT NULL, textcontent text NOT NULL, itemnumber int4 NOT NULL, fiscalyear int2 NOT NULL, identification varchar(25) NOT NULL, partneridentificationid int4, executoruserid int2 NOT NULL, partnerid int4, va

Re: [GENERAL] multiple row insertion

2007-10-04 Thread Dawid Kuroczko
> On 10/4/07, test tester <[EMAIL PROTECTED]> wrote: > > i have version 8.1 and i want to know how to insert multiple rows in this > version. Please don't top post. If you need this functionality, you should really upgrade. In cases where you want to insert multiple rows in version 8.1, you coul

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Alvaro Herrera
Miroslav Šulc wrote: > I just verified that the problem is in pg 8.2.5 too. Can you show us the table definitions? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support ---(end

Re: [GENERAL] multiple row insertion

2007-10-04 Thread test tester
On 10/4/07, test tester <[EMAIL PROTECTED]> wrote: > > i have version 8.1 and i want to know how to insert multiple rows in this > version. > > On 10/4/07, Ashish Karalkar < [EMAIL PROTECTED]> wrote: > > > > INSERT INTO qsweb.core_board(board_name, entry_user_id, entry_date) > > VALUES ('a',1,

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Miroslav Šulc
I just verified that the problem is in pg 8.2.5 too. -- Miroslav Šulc Miroslav Šulc napsal(a): > Just copied client database from production server to my dev database > and ran the query on my dev database and it fails too so it seems it > also depends on whether some data are contained in the ta

Re: [GENERAL] Find min year and min value

2007-10-04 Thread Michael Glaesemann
On Oct 4, 2007, at 6:41 , Stefan Schwarzer wrote: So, "value" is something general - it can be (measured in) (thousand) Dollars, (Million) People, (Hundred) Hectares etc... Then I would make a separate table for each variable (as I described above). For one thing, you're going to have keep

Re: [GENERAL] Design Question (Time Series Data)

2007-10-04 Thread Andreas Strasser
Pavel Stehule schrieb: 2007/10/4, Jorge Godoy <[EMAIL PROTECTED]>: On Thursday 04 October 2007 06:20:19 Pavel Stehule wrote: I'd use the same solution that he was going to: normalized table including a timestamp (with TZ because of daylight saving times...), a column with a FK to a series table

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Miroslav Šulc
Just copied client database from production server to my dev database and ran the query on my dev database and it fails too so it seems it also depends on whether some data are contained in the tables or not. -- Miroslav Šulc Miroslav Šulc napsal(a): > Hi, > > I get this error when running this

[GENERAL] ERROR: variable not found in subplan target lists

2007-10-04 Thread Miroslav Šulc
Hi, I get this error when running this query (generated by code so it is not ideal though still valid I guess): SELECT Invoice.* FROM Invoice WHERE false AND InvoiceGroupId IN (SELECT InvoiceGroup.Id FROM InvoiceGroup INNER JOIN PartnerBranch ON InvoiceGroup.PartnerBranchId = PartnerBranch.Id WH

Re: [GENERAL] Generating TRUNCATE orders

2007-10-04 Thread Florian Pflug
Erik Jones wrote: On Oct 3, 2007, at 12:19 PM, Scott Marlowe wrote: SELECT 'TRUNCATE ' || schemaname || '.' || tablename ';' FROM pg_tables WHERE schemname='my_schema' ORDER BY tablename; To be safe, you'd probably want to write SELECT 'TRUNCATE' || quote_ident(schemaname) || '.' || quote_iden

Re: [GENERAL] multiple row insertion

2007-10-04 Thread Ashish Karalkar
INSERT INTO qsweb.core_board(board_name, entry_user_id, entry_date) VALUES ('a',1,now()),('b',1,now()); - Original Message - From: test tester To: pgsql-general@postgresql.org Sent: Thursday, October 04, 2007 4:49 PM Subject: [GENERAL] multiple row insertion In MySQL, I

Re: [GENERAL] Find min year and min value

2007-10-04 Thread Stefan Schwarzer
Having 500 statistical global national variables for about 240 countries/territories. Need to do regional aggregations, per Capita calculations and some completeness computations on-the-fly. id_variable |year|value |id_country Both Steve and I have given you alternat

Re: [GENERAL] multiple row insertion

2007-10-04 Thread Mikko Partio
On 10/4/07, test tester <[EMAIL PROTECTED]> wrote: > > In MySQL, I can insert multiple rows like this: > > > insert into cars values(5, "toyota"),(5,"ford"), etc. > > > How can I do something similiar in PostgreSQL? > > Exactly the same way. Make sure though that your pgsql is new enough version (8

[GENERAL] multiple row insertion

2007-10-04 Thread test tester
In MySQL, I can insert multiple rows like this: insert into cars values(5, "toyota"),(5,"ford"), etc. How can I do something similiar in PostgreSQL?

Re: [GENERAL] Design Question (Time Series Data)

2007-10-04 Thread Pavel Stehule
2007/10/4, Jorge Godoy <[EMAIL PROTECTED]>: > On Thursday 04 October 2007 06:20:19 Pavel Stehule wrote: > > > > I did good experience with 2 variant. PostgreSQL needs 24bytes for > > head of every row, so isn't too much efective store one field to one > > row. You can simply do transformation betwe

Re: [GENERAL] Postgres8: subselect and optimizer/planner

2007-10-04 Thread Erwin Moller
Erwin Moller wrote: SELECT U.userid, U.username, (SELECT G.groupname FROM tblgroup WHERE (G.userid=U.userid)) AS ingroup typo, that should be 'tblgroup as G' of course. FROM tbluser WHERE (bla..bla...); --- Erwin Moller Darwine BV Groenendaal 25f 3011 SK Rotterdam tel 010

[GENERAL] Postgres8: subselect and optimizer/planner

2007-10-04 Thread Erwin Moller
Hi, I am fairly new to EXPLAIN, butl working on it. ;-) I have a few slow running queries I am trying to optimize. First thing I wonder: I sometimes (lazy) add a subselect to queries. A stupid example to clearify what I mean: SELECT U.userid, U.username, (SELECT G.groupname FROM tblgroup WHERE

Re: [GENERAL] Design Question (Time Series Data)

2007-10-04 Thread Jorge Godoy
On Thursday 04 October 2007 06:20:19 Pavel Stehule wrote: > > I did good experience with 2 variant. PostgreSQL needs 24bytes for > head of every row, so isn't too much efective store one field to one > row. You can simply do transformation between array and table now. But then you'll make all SQL

Re: [GENERAL] Design Question (Time Series Data)

2007-10-04 Thread Pavel Stehule
2007/10/4, Andreas Strasser <[EMAIL PROTECTED]>: > Hello, > > i'm currently designing an application that will retrieve economic data > (mainly time series)from different sources and distribute it to clients. > It is supposed to manage around 20.000 different series with differing > numbers of obse

Re: [GENERAL]About selected data dump

2007-10-04 Thread Albe Laurenz
longlong wrote: > I want to transmit data from a database to another partly, > which means only data that selected in a table will be transmit. > > I can select data , and then inert or update rows one by one. > But is there any way better? You can export part of a table with COPY (sql query) TO