Re: [GENERAL] newbie how to access the information scheme

2015-02-25 Thread frank ernest
Thanks -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] newbie how to access the information scheme

2015-02-24 Thread Tomas Vondra
On 24.2.2015 19:58, John McKown wrote: > I normally do the command (in psql) > > \d+ > > But if you want an actual SQL statement, the above invokes: > > SELECT n.nspname as "Schema", > c.relname as "Name", > CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'm' > THEN 'materiali

Re: [GENERAL] newbie how to access the information scheme

2015-02-24 Thread John McKown
I normally do the command (in psql) \d+ But if you want an actual SQL statement, the above invokes: SELECT n.nspname as "Schema", c.relname as "Name", CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'm' THEN 'materialized view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WH

Re: [GENERAL] newbie question

2011-06-06 Thread Craig Ringer
On 06/07/2011 04:17 AM, Heine Ferreira wrote: Hi Does Postgresql utilize hyperthreading and multiple cores on the relevant processors on windows? Sort-of. PostgreSQL runs many processes, one per query. Each process has a single thread. This means that one query can use at most one CPU core,

Re: [GENERAL] newbie question

2011-06-06 Thread Dann Corbit
PostgreSQL is process based. So it can be configured to use resources as intensively as you like. From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Heine Ferreira Sent: Monday, June 06, 2011 1:17 PM To: pgsql-general@postgresql.org Subject: [GENER

Re: [GENERAL] newbie question

2011-06-06 Thread Chris Curvey
On Mon, Jun 6, 2011 at 4:17 PM, Heine Ferreira wrote: > Hi > > Does Postgresql utilize hyperthreading and multiple cores on the relevant > processors on windows? > > Thanks > > H.F. > > It certainly looks like it on my machine! As far as my Linux box can tell, the "hyperthreaded" CPUs just appear

Re: [GENERAL] newbie question - delete before insert

2010-11-20 Thread Sim Zacks
How do people implement insert or upate ( otherwise known as upsert ) behaviour in postgres i.e. insert a row if it's key does not exist in the database else update the existing row? I tried using an insert rule to delete any existing rows first then insert however this leads to infinitely r

Re: [GENERAL] newbie question - delete before insert

2010-11-20 Thread Ashish Karalkar
On 11/20/2010 02:43 PM, Thomas Kellerer wrote: > Grant Mckenzie wrote on 20.11.2010 07:00: >> How do people implement insert or upate ( otherwise known as upsert ) >> behaviour in postgres i.e. insert a row if it's key does not exist in >> the database else update the existing row? >> > > You can s

Re: [GENERAL] newbie question - delete before insert

2010-11-20 Thread Thomas Kellerer
Grant Mckenzie wrote on 20.11.2010 07:00: How do people implement insert or upate ( otherwise known as upsert ) behaviour in postgres i.e. insert a row if it's key does not exist in the database else update the existing row? You can simply send the UPDATE, if nothing was updated, it's safe to

Re: [GENERAL] Newbie cannot create tablespace

2009-11-09 Thread Scott Marlowe
On Mon, Nov 9, 2009 at 3:12 PM, Richard Sickler wrote: > Hi List, > > I'm trying to create a tablespace using the following command copied > from pg_dumpall, > > CREATE TABLESPACE test OWNER postgres LOCATION 'd:/prodb'; > > I receive the following message > > ERROR:  directory "d:/proddb" is not

Re: [GENERAL] [Newbie] UPDATE based on other table content

2009-10-29 Thread Daniel Chiaramello
Thom Brown a écrit : ... 2009/10/29 Daniel Chiaramello : Never mind, I found how finally: UPDATE product SET qty = qty+s_count FROM ( SELECT intermediate.product_id, count(*) AS s_count FROM intermediate, orders WHERE

Re: [GENERAL] [Newbie] UPDATE based on other table content

2009-10-29 Thread Thom Brown
2009/10/29 Daniel Chiaramello : > Never mind, I found how finally: > > UPDATE >   product > SET >   qty = qty+s_count > FROM ( >       SELECT >           intermediate.product_id, >           count(*) AS s_count >       FROM >           intermediate, >           orders >       WHERE >           orde

Re: [GENERAL] [Newbie] UPDATE based on other table content

2009-10-29 Thread Daniel Chiaramello
Never mind, I found how finally: UPDATE product SET qty = qty+s_count FROM ( SELECT intermediate.product_id, count(*) AS s_count FROM intermediate, orders WHERE orders.intermediate_id=intermediate.id GROUP BY

Re: [GENERAL] newbie table design question

2009-06-02 Thread Merlin Moncure
2009/6/1 Andrew Smith : > 2009/6/2 björn lundin >> >> > CREATE TABLE "DataImport" >> > ( >> >   "DataImportID" serial NOT NULL PRIMARY KEY, >> >   "Time" timestamp without time zone NOT NULL, >> >   "ID_ABC" integer NOT NULL, >> >   "ID_DEF" integer NOT NULL, >> >   "ID_HIJ" integer NOT NULL, >> >

Re: [GENERAL] newbie table design question

2009-06-02 Thread Grzegorz Jaśkiewicz
On Tue, Jun 2, 2009 at 2:27 PM, Merlin Moncure wrote: > _IF_ arrays fit your requirements, they are an extremely compact and > efficient way to store your data.  The requirements are exact..you > can't update or extract a single piece of data out of a block > efficiently.  While indexing techniqu

Re: [GENERAL] newbie table design question

2009-06-02 Thread Merlin Moncure
On Mon, Jun 1, 2009 at 8:41 AM, Sam Mason wrote: > On Mon, Jun 01, 2009 at 06:53:30AM -0500, Chris Spotts wrote: >> I just finished doing something very close to this - not quite once per >> minute, but close.  I started off with an array of integers and after about >> a month of it, I'm having to

Re: [GENERAL] newbie table design question

2009-06-01 Thread Andrew Smith
2009/6/2 björn lundin > > > CREATE TABLE "DataImport" > > ( > > "DataImportID" serial NOT NULL PRIMARY KEY, > > "Time" timestamp without time zone NOT NULL, > > "ID_ABC" integer NOT NULL, > > "ID_DEF" integer NOT NULL, > > "ID_HIJ" integer NOT NULL, > > etc > > ); > > Perhaps you want

Re: [GENERAL] newbie table design question

2009-06-01 Thread Scott Marlowe
2009/6/1 björn lundin : > >> CREATE TABLE "DataImport" >> ( >>   "DataImportID" serial NOT NULL PRIMARY KEY, >>   "Time" timestamp without time zone NOT NULL, >>   "ID_ABC" integer NOT NULL, >>   "ID_DEF" integer NOT NULL, >>   "ID_HIJ" integer NOT NULL, >>   etc >> ); > > Perhaps you want to not u

Re: [GENERAL] newbie table design question

2009-06-01 Thread björn lundin
> CREATE TABLE "DataImport" > ( >   "DataImportID" serial NOT NULL PRIMARY KEY, >   "Time" timestamp without time zone NOT NULL, >   "ID_ABC" integer NOT NULL, >   "ID_DEF" integer NOT NULL, >   "ID_HIJ" integer NOT NULL, >   etc > ); Perhaps you want to not use the "" around the table and column

Re: [GENERAL] newbie table design question

2009-06-01 Thread Grzegorz Jaśkiewicz
one word, horizontal structure. you are trying to sort 1500 colums, instead of creating 1500 rows per entry... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] newbie table design question

2009-06-01 Thread Sam Mason
On Mon, Jun 01, 2009 at 06:53:30AM -0500, Chris Spotts wrote: > I just finished doing something very close to this - not quite once per > minute, but close. I started off with an array of integers and after about > a month of it, I'm having to redesign my way out of it. I've had to go the other w

Re: [GENERAL] newbie table design question

2009-06-01 Thread Chris Spotts
gsql-general-ow...@postgresql.org] On Behalf Of Sam Mason Sent: Monday, June 01, 2009 5:00 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] newbie table design question On Sun, May 31, 2009 at 11:54:09PM +0800, Andrew Smith wrote: > I'm a beginner when it comes to Postgresql, and have

Re: [GENERAL] newbie table design question

2009-06-01 Thread Sam Mason
On Sun, May 31, 2009 at 11:54:09PM +0800, Andrew Smith wrote: > I'm a beginner when it comes to Postgresql, and have a table design question > about a project I'm currently working on. I have 1500 data items that need > to be copied every minute from an external system into my database. The > ite

Re: [GENERAL] newbie table design question

2009-05-31 Thread Andrew Smith
On Mon, Jun 1, 2009 at 1:25 AM, Tom Lane wrote: > Andrew Smith writes: > > I'm a beginner when it comes to Postgresql, and have a table design > question > > about a project I'm currently working on. I have 1500 data items that > need > > to be copied every minute from an external system into m

Re: [GENERAL] newbie table design question

2009-05-31 Thread Tom Lane
Andrew Smith writes: > I'm a beginner when it comes to Postgresql, and have a table design question > about a project I'm currently working on. I have 1500 data items that need > to be copied every minute from an external system into my database. The > items have a timestamp, an identifier and a

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Carl Sopchak
On Sunday, March 08, 2009, Tom Lane wrote: > Carl Sopchak writes: > > Here's what's around the error message in the log: > > > > SPI Proc: 3154128080 total in 398 blocks; 13664 free (178 chunks); > > 3154114416 used > > Hmm, so apparently some internal leak within the plpgsql engine. I'd be >

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Tom Lane
Carl Sopchak writes: > Here's what's around the error message in the log: > SPI Proc: 3154128080 total in 398 blocks; 13664 free (178 chunks); > 3154114416 used Hmm, so apparently some internal leak within the plpgsql engine. I'd be willing to look into this if you can provide a self-conta

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Carl Sopchak
On Sunday, March 08, 2009, Tom Lane wrote: > Carl Sopchak writes: > > On Sunday, March 08, 2009, Gregory Stark wrote: > >> What do you mean you're running out of memory? > > > > "ERROR: Out of Memory" is what I meant when I said I was running out of > > memory! :-) This is returned by psql, but

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Carl Sopchak
On Sunday, March 08, 2009, Alvaro Herrera wrote: > Carl Sopchak wrote: > > Well, the upgrade to 8.3 seemed to rid me of the command limit, but now > > I'm running out of memory. I have 2Gb physical and 8Gb swap (after > > adding 4Gb). > > Do you have AFTER triggers on the involved tables? They ar

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Thomas Kellerer
Carl Sopchak wrote on 08.03.2009 17:37: or a way to run a function outside an implicit transaction No sensible DBMS will let you do _anything_ outside a transaction Thomas -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Tom Lane
Carl Sopchak writes: > On Sunday, March 08, 2009, Gregory Stark wrote: >> What do you mean you're running out of memory? > "ERROR: Out of Memory" is what I meant when I said I was running out of > memory! :-) This is returned by psql, but it is the postmaster process that > is hitting the wal

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Carl Sopchak
On Sunday, March 08, 2009, Gregory Stark wrote: > Carl Sopchak writes: > > Well, the upgrade to 8.3 seemed to rid me of the command limit, but now > > I'm running out of memory. I have 2Gb physical and 8Gb swap (after > > adding 4Gb). > > What do you mean you're running out of memory? For most pa

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Alvaro Herrera
Carl Sopchak wrote: > Well, the upgrade to 8.3 seemed to rid me of the command limit, but now I'm > running out of memory. I have 2Gb physical and 8Gb swap (after adding 4Gb). Do you have AFTER triggers on the involved tables? They are recorded on memory and we have no mechanism to spill to dis

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Gregory Stark
Carl Sopchak writes: > Well, the upgrade to 8.3 seemed to rid me of the command limit, but now I'm > running out of memory. I have 2Gb physical and 8Gb swap (after adding 4Gb). What do you mean you're running out of memory? For most part of Postgres that's only a problem if you've configured i

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Carl Sopchak
Well, the upgrade to 8.3 seemed to rid me of the command limit, but now I'm running out of memory. I have 2Gb physical and 8Gb swap (after adding 4Gb). Is there a way for me to run this outside of one huge transaction? This really shouldn't be using more than a few hundred megs of RAM (assumin

Re: [GENERAL] Newbie questions relating to transactions

2009-03-07 Thread Tom Lane
Carl Sopchak writes: > I have written a PL/pgSQL function that performs these calculations by > reading > the needed data, calculating, and saving the results. When run over a > smaller set of data, it works fine. But when I tried to run it over this > larger set of data, I got the error mes

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-14 Thread Devrim GÜNDÜZ
On Tue, 2008-08-12 at 17:25 +0200, Daneel wrote: > > When I run > service postgresql initdb > I get > "se: [FAILED]". > However, /var/lib/pqsql/data is created and user postgres owns it. > > But then I run > service postgresql start > and the very same error occurs.. Anything in /var/lib/pgs

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-14 Thread Scott Marlowe
On Thu, Aug 14, 2008 at 4:18 AM, Daneel <[EMAIL PROTECTED]> wrote: > Martin Marques wrote: >> >> Daneel escribió: >>> >>> Daneel wrote: While going through http://wiki.postgresql.org/wiki/Detailed_installation_guides and typing service postgresql start as root I got >>

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-14 Thread Daneel
Scott Marlowe wrote: On Tue, Aug 12, 2008 at 9:25 AM, Daneel <[EMAIL PROTECTED]> wrote: While going through http://wiki.postgresql.org/wiki/Detailed_installation_guides and typing service postgresql start as root I got "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initializ

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-14 Thread Daneel
Martin Marques wrote: Daneel escribió: Daneel wrote: While going through http://wiki.postgresql.org/wiki/Detailed_installation_guides and typing service postgresql start as root I got "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first." When I r

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-14 Thread Daneel
Scott Marlowe wrote: PLEASE DON'T WRITE TO THIS LIST WITH A FAKE EMAIL ADDRESS. It's been discussed before, but it's rude and counterproductive. Just set up a filter / account that drops everything coming in, but don't stick the rest of us with your broken email behaviour I'm sorry, just foll

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-13 Thread Martin Marques
Daneel escribió: Daneel wrote: While going through http://wiki.postgresql.org/wiki/Detailed_installation_guides and typing service postgresql start as root I got "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first." When I run service postgresql i

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-13 Thread Scott Marlowe
PLEASE DON'T WRITE TO THIS LIST WITH A FAKE EMAIL ADDRESS. It's been discussed before, but it's rude and counterproductive. Just set up a filter / account that drops everything coming in, but don't stick the rest of us with your broken email behaviour On Tue, Aug 12, 2008 at 9:25 AM, Daneel <[EM

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-13 Thread Scott Marlowe
On Tue, Aug 12, 2008 at 9:25 AM, Daneel <[EMAIL PROTECTED]> wrote: > While going through > http://wiki.postgresql.org/wiki/Detailed_installation_guides > and typing > service postgresql start > as root I got > "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to > initialize the clus

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-13 Thread Martin Marques
Daneel escribió: While going through http://wiki.postgresql.org/wiki/Detailed_installation_guides and typing service postgresql start as root I got "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first." When I run service postgresql initdb I get "se

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-13 Thread Tom Lane
Daneel <[EMAIL PROTECTED]> writes: > When I run > service postgresql initdb > I get > "se: [FAILED]". > However, /var/lib/pqsql/data is created and user postgres owns it. Is there anything in /var/lib/pgsql/pgstartup.log ? How about the main /var/log/messages file? re

Re: [GENERAL] Newbie [CentOS 5.2] service postgresql initdb

2008-08-13 Thread Daneel
Daneel wrote: While going through http://wiki.postgresql.org/wiki/Detailed_installation_guides and typing service postgresql start as root I got "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first." When I run service postgresql initdb I get "se:

Re: [GENERAL] newbie: update timestamp trigger?

2007-10-23 Thread Scott Marlowe
On 10/23/07, ahnf <[EMAIL PROTECTED]> wrote: > Whenever a row is updated in a table with a timestamp column. How do I write > a trigger to set that timestamp column to now() or the current timestamp? You should be able to take a virtual chainsaw to the example on this page and do it: http://www.

Re: [GENERAL] newbie: update timestamp trigger?

2007-10-23 Thread Rodrigo De León
On 10/23/07, ahnf <[EMAIL PROTECTED]> wrote: > Whenever a row is updated in a table with a timestamp column. How do I write > a trigger to set that timestamp column to now() or the current timestamp? Straight from the horse's mouth: http://www.postgresql.org/docs/8.2/static/plpgsql-trigger.html#P

Re: [GENERAL] newbie question

2007-10-17 Thread Joris Dobbelsteen
>-Original Message- >From: Russell Aspinwall [mailto:[EMAIL PROTECTED] >Sent: woensdag 17 oktober 2007 11:37 >To: Joris Dobbelsteen >Subject: Re: [GENERAL] newbie question > >Joris Dobbelsteen wrote: >>> -Original Message- >>> From: [EMAIL

Re: [GENERAL] newbie question

2007-10-17 Thread Joris Dobbelsteen
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of >Russell Aspinwall >Sent: woensdag 17 oktober 2007 9:34 >To: pgsql-general@postgresql.org >Subject: [GENERAL] newbie question > >Hi, > >[snip] For example, if you had a >built a database and application

Re: [GENERAL] NEWBIE: How do I get the oldest date contained in 3 tables

2007-04-10 Thread John D. Burger
SELECT min(x) FROM ( SELECT min(datecol1) AS x FROM table1 UNION ALL SELECT min(datecol2) AS x FROM table2 UNION ALL SELECT min(datecol3) AS x FROM table3 ) ss; Exercise for newbie: which of the AS clauses are redundant? Um, all of them? Yah, but only if you do this: SELECT min(*) FROM (

Re: [GENERAL] NEWBIE: How do I get the oldest date contained in 3 tables

2007-04-10 Thread Lorenzo Thurman
Tom Lane wrote: "Dann Corbit" <[EMAIL PROTECTED]> writes: [EMAIL PROTECTED] On Behalf Of Lorenzo Thurman I have three tables using date fields. I want to retrieve the oldest date contained in the tables. Can someone show me an example of a query that would do that? Just do a union and return

Re: [GENERAL] NEWBIE: How do I get the oldest date contained in 3 tables

2007-04-10 Thread Lorenzo Thurman
Lorenzo Thurman wrote: I have three tables using date fields. I want to retrieve the oldest date contained in the tables. Can someone show me an example of a query that would do that? TIA I think I have it, but if anyone has any comments, I'd appreciate it: select min(old) as oldest from (se

Re: [GENERAL] NEWBIE: How do I get the oldest date contained in 3 tables

2007-04-10 Thread Lorenzo Thurman
Brent Wood wrote: Lorenzo Thurman wrote: I have three tables using date fields. I want to retrieve the oldest date contained in the tables. Can someone show me an example of a query that would do that? You could write a custom function doing the same sort of thing, or (perhaps more portable) u

Re: [GENERAL] NEWBIE: How do I get the oldest date contained in 3 tables

2007-04-09 Thread Brent Wood
Lorenzo Thurman wrote: I have three tables using date fields. I want to retrieve the oldest date contained in the tables. Can someone show me an example of a query that would do that? You could write a custom function doing the same sort of thing, or (perhaps more portable) use generic sqls & v

Re: [GENERAL] NEWBIE: How do I get the oldest date contained in 3 tables

2007-04-09 Thread Merlin Moncure
On 4/9/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Dann Corbit" <[EMAIL PROTECTED]> writes: >> [EMAIL PROTECTED] On Behalf Of Lorenzo Thurman >> I have three tables using date fields. I want to retrieve the oldest >> date contained in the tables. Can someone show me an example of a query >> that wou

Re: [GENERAL] NEWBIE: How do I get the oldest date contained in 3 tables

2007-04-09 Thread Tom Lane
"Dann Corbit" <[EMAIL PROTECTED]> writes: >> [EMAIL PROTECTED] On Behalf Of Lorenzo Thurman >> I have three tables using date fields. I want to retrieve the oldest >> date contained in the tables. Can someone show me an example of a query >> that would do that? > Just do a union and return the min

Re: [GENERAL] NEWBIE: How do I get the oldest date contained in 3 tables

2007-04-09 Thread Dann Corbit
Just do a union and return the min > -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-general- > [EMAIL PROTECTED] On Behalf Of Lorenzo Thurman > Sent: Monday, April 09, 2007 7:32 AM > To: pgsql-general@postgresql.org > Subject: [GENERAL] NEWBIE: How do I get the oldest date cont

Re: [GENERAL] Newbie questions (pg_global, tablespace, pg_temp, ...)

2007-01-17 Thread Martijn van Oosterhout
On Wed, Jan 17, 2007 at 07:02:13PM +0530, Alexi Gen wrote: > Hello, > > I'm new to postgreSQL (not databases) and trying to find my way arouund. > Have a couple of questions: > > (a) In which dir is the pg_global stored? > Is it "C:\Program Files\PostgreSQL\8.2\data\global"? Yes. > (b) Why is t

Re: [GENERAL] Newbie Constraint ?

2007-01-09 Thread Bruno Wolff III
On Mon, Jan 08, 2007 at 14:55:29 -0600, Jeanna Geier <[EMAIL PROTECTED]> wrote: > > Not quite sure what the: CONSTRAINT "Relationship182" is exactly... can > anyone help me with this one? Haven't seen this one yet... It is the name of that particular constraint. You would use that if you wer

Re: [GENERAL] Newbie Constraint ?

2007-01-08 Thread Bricklen Anderson
Jeanna Geier wrote: Hello List! OK, so I'm new to SQL and Postgres and am working on taking over this DB work, and ran across a command that I'm not sure of and am wondering if you can help me with... Probably a basic SQL question, but thought more than one person on here would be able to poin

Re: [GENERAL] Newbie Constraint ?

2007-01-08 Thread Jeanna Geier
Hello List! OK, so I'm new to SQL and Postgres and am working on taking over this DB work, and ran across a command that I'm not sure of and am wondering if you can help me with... Probably a basic SQL question, but thought more than one person on here would be able to point me in the right dire

Re: [GENERAL] Newbie needs help with ERROR: could not write to file

2006-10-18 Thread Shane Ambler
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/18/06 20:41, andrew plata wrote: I am trying to following the instructions at URL below to try to create a database called web_database required for phpPgAdmin. When I try to do this I get the following error: template1=# c

Re: [GENERAL] Newbie needs help with ERROR: could not write to file

2006-10-18 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/18/06 20:41, andrew plata wrote: > I am trying to following the instructions at URL below to try to create a > database called web_database required for phpPgAdmin. When I try to do this > I get the following error: > > template1=# create databa

Re: [GENERAL] Newbie needs help with ERROR: could not write to file

2006-10-18 Thread Chris
andrew plata wrote: I am trying to following the instructions at URL below to try to create a database called web_database required for phpPgAdmin. When I try to do this I get the following error: template1=# create database web_database owner web_user; ERROR: could not write to file "base/16

Re: [GENERAL] Newbie question about importing text files...

2006-10-11 Thread Scott Marlowe
On Tue, 2006-10-10 at 04:16, Ron Johnson wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 10/09/06 22:43, Jonathan Greenberg wrote: > > So I've been looking at the documentation for COPY, and I'm curious about a > > number of features which do not appear to be included, and whether

Re: [GENERAL] Newbie question about importing text files...

2006-10-10 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/09/06 22:43, Jonathan Greenberg wrote: > So I've been looking at the documentation for COPY, and I'm curious about a > number of features which do not appear to be included, and whether these > functions are found someplace else: > > 1) How do I

Re: [GENERAL] Newbie question about importing text files...

2006-10-10 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/10/06 01:44, Merlin Moncure wrote: > On 10/10/06, Jonathan Greenberg <[EMAIL PROTECTED]> wrote: >> So I've been looking at the documentation for COPY, and I'm curious >> about a >> number of features which do not appear to be included, and whethe

Re: [GENERAL] Newbie question about importing text files...

2006-10-09 Thread Merlin Moncure
On 10/10/06, Jonathan Greenberg <[EMAIL PROTECTED]> wrote: So I've been looking at the documentation for COPY, and I'm curious about a number of features which do not appear to be included, and whether these functions are found someplace else: 1) How do I skip an arbitrary # of "header" lines

Re: [GENERAL] Newbie "Copy From" not working

2006-08-17 Thread Walter Vaughan
Michael Fuhr wrote: On Thu, Aug 17, 2006 at 03:27:26PM -0400, Walter Vaughan wrote: ERROR: missing data for column "processed_timestamp" The table you posted has 42 columns; at least one line in the file doesn't have that many fields. Yes, we didn't have the right number of columns... We

Re: [GENERAL] Newbie "Copy From" not working

2006-08-17 Thread Michael Fuhr
On Thu, Aug 17, 2006 at 03:27:26PM -0400, Walter Vaughan wrote: > Admin_=# COPY DATA_IMPORT_CUSTOMER FROM '/tmp/sold.pg' delimiter '|' null > ''; > ERROR: missing data for column "processed_timestamp" > CONTEXT: COPY data_import_customer, line 1: "(xxx) xxx-||Mary|Smith|76 > Crest Street||J

Re: [GENERAL] Newbie "Copy From" not working

2006-08-17 Thread Terry Lee Tucker
On Thursday 17 August 2006 03:27 pm, Walter Vaughan <[EMAIL PROTECTED]> thus communicated: > The problem is I need to load a field that is allowed to be null with > nothing and it work The above statement is not the problem you are having. We dumped and loaded a 4 gig Progress database with

Re: [GENERAL] newbie here

2006-07-27 Thread Chris
Thiago Germano Beier wrote: Hi all, I'm using postgresql version 8.1 on FREEBSD 6.x some info - bash-2.05b# pkg_info | grep post postgresql-client-8.1.4 PostgreSQL database (client) postgresql-docs-8.1.4 The PostgreSQL documentation set postgresql-relay-1.3.1 Multiplex multiple Postgre

Re: [GENERAL] Newbie help please....

2006-07-17 Thread Harald Armin Massa
Sue,you can walk an easier road to get your Excel Table filled with PostgreSQL data:there is an ODBC.Driver for PostgreSQL, you can google it or find it within the standard PostgreSQL for Windows Installer. After installing the ODBC driver, PostgreSQL is a normal data soure to Excel; you can put yo

Re: [GENERAL] Newbie help please....

2006-07-17 Thread Richard Broersma Jr
> I am relatively new to PostgreSQL, having only been exposed to it with > a recent DSpace implementation (in the last 8 months or so). I have created > a new database in PostgreSQL and have written a SQL query against the > database. The database resides on a Sunfire V440 Solaris 9 machine.

Re: [GENERAL] newbie : setting access for users in a web enviroment

2005-12-25 Thread Bruno Wolff III
On Sat, Dec 24, 2005 at 08:41:49 -0400, robert mena <[EMAIL PROTECTED]> wrote: > > If I'd need to define a user with SELECT privileges to all tables in > my test database, how could I do that? You can't. You can write a script that will give them access to all of the tables that currently exist

Re: [GENERAL] newbie : setting access for users in a web enviroment

2005-12-24 Thread robert mena
Hi, thanks for the reply. I've already read the docs. I am using 8.0.5 btw. One of the things I am confused is how can I give the privileges to the database without having to know the specific tables. The grant command when applied to a database simply mentions CREATE so the user can create ta

Re: [GENERAL] newbie : setting access for users in a web enviroment

2005-12-23 Thread Peter Eisentraut
Am Freitag, 23. Dezember 2005 22:06 schrieb robert mena: > GRANT CREATE,REFERENCES ON DATABASE test TO testadm; > > \z > Access privileges for database "test" > Schema | Name | Type | Access privileges > +--+--+--- > > How can I specify that the user testadm can per

Re: [GENERAL] newbie : setting access for users in a web enviroment

2005-12-23 Thread Qingqing Zhou
"robert mena" <[EMAIL PROTECTED]> wrote > > How can I specify that the user testadm can perform those actions to this > database? Use GRANT command (the opposite is REVOKE). I suppose you are using 8.1: http://www.postgresql.org/docs/8.1/static/sql-grant.html Regards, Qingqing -

Re: [GENERAL] Newbie Question: FAQ for database optimization?

2005-12-22 Thread David Fetter
On Tue, Dec 20, 2005 at 10:21:54PM +0100, Alexander Scholz wrote: > Hi, > > is there a newbie's FAQ / book / link for "howto optimize databases with > PostgreSQL"? > > Background: Customer has the Windows* (sorry ) Postgres 8.1.0 > standard installation "out of the box". A table has 2.5 mio reco

Re: [GENERAL] Newbie Question: FAQ for database optimization?

2005-12-20 Thread A. Kretschmer
am 20.12.2005, um 22:21:54 +0100 mailte Alexander Scholz folgendes: > Hi, > > is there a newbie's FAQ / book / link for "howto optimize databases with > PostgreSQL"? 07:12 < rtfm_please> For information about tuning 07:12 < rtfm_please> see http://www.powerpostgresql.com 07:12 < rtfm_please> or

Re: [GENERAL] newbie design question re impact of VACUUM

2005-11-09 Thread Jim C. Nasby
First rule of performance tuning: don't. See how well things run using the simple plan you've drawn up. If performance is acceptable, you're done. Yes, you could keep the flag in a seperate table, but remember that every row has a ~20 byte overhead, which is non-trivial. If you want to go this rou

Re: [GENERAL] newbie design question re impact of VACUUM

2005-11-09 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > As a background, I'll be using Postgres in part as a processing queue > for a 40-column stream of information (~ 250 bytes/row) with a > sustained input rate of 20 rows/sec. This queue will be processed > periodicall

Re: [GENERAL] newbie design question re impact of VACUUM

2005-11-09 Thread Richard Huxton
[EMAIL PROTECTED] wrote: After looking at "Chapter 22. Routine Database Maintenance Tasks" (http://www.postgresql.org/docs/8.1/interactive/maintenance.html), I started wondering about what (if any) consideration to give to to VACUUM issues in the following context. As a background, I'll be using

Re: [GENERAL] newbie question: reading sql commands from script

2005-10-28 Thread basel novo
Thanks to all who answered this question! From: Brent Wood <[EMAIL PROTECTED]> To: basel novo <[EMAIL PROTECTED]> CC: pgsql-general@postgresql.org Subject: Re: [GENERAL] newbie question: reading sql commands from script Date: Wed, 26 Oct 2005 10:36:34 +1300 (NZDT) On Tue, 25 Oct

Re: [GENERAL] newbie question: reading sql commands from script

2005-10-26 Thread Brent Wood
On Tue, 25 Oct 2005, basel novo wrote: > What is the equivalent of the mysql 'source' command for reading sql > commands from ascii script files? > I have not used mysql, so am not familiar with the source command, but to have postgres run a set of sql statements/queries from a file you can: p

Re: [GENERAL] newbie question: reading sql commands from script

2005-10-25 Thread Oliver Elphick
On Mon, 2005-10-24 at 20:39 -0400, Sean Davis wrote: > In psql, look at \i. > > Sean > > - Original Message - > From: basel novo > To: pgsql-general@postgresql.org > Sent: Monday, October 24, 2005 8:28 PM > Subject: [GENERAL] newbie question: r

Re: [GENERAL] newbie question: reading sql commands from script files

2005-10-24 Thread Sean Davis
Title: [GENERAL] newbie question: reading sql commands from script files In psql, look at \i.   Sean   - Original Message - From: basel novo To: pgsql-general@postgresql.org Sent: Monday, October 24, 2005 8:28 PM Subject: [GENERAL] newbie question: reading sq

Re: [GENERAL] Newbie Questions

2005-10-24 Thread Oliver Elphick
On Fri, 2005-10-21 at 19:46 -0400, Douglas McNaught wrote: > Redefined Horizons <[EMAIL PROTECTED]> writes: > > > I'm running the latest stable version of PostgreSQL on a Debian Linux box > > running Gnome 2.0. I've just started setting up my first database with > > PostgreSQL and I've got a few n

Re: [GENERAL] Newbie Questions

2005-10-21 Thread Guy Rouillier
Changed your email format from HTML to plain text, which is preferred on most mailing lists. Redefined Horizons wrote: > I'm running the latest stable version of PostgreSQL on a Debian Linux > box running Gnome 2.0. I've just started setting up my first database > with PostgreSQL and I've got a fe

Re: [GENERAL] Newbie Questions

2005-10-21 Thread Douglas McNaught
Redefined Horizons <[EMAIL PROTECTED]> writes: > I'm running the latest stable version of PostgreSQL on a Debian Linux box > running Gnome 2.0. I've just started setting up my first database with > PostgreSQL and I've got a few newbie questions: I'm going to assume you installed the Debian packag

Re: [GENERAL] newbie - postgresql or mysql

2005-09-01 Thread Frank
>>mysqldump --extended-insert=FALSE<< Thanks for the help, this is allowing me to import the data now. Regards, Frank At 09:37 AM 9/1/2005, Michael Fuhr wrote: [Please copy the mailing list on replies so others can contribute to and learn from the discussion. Also, please don't top-post, as

Re: [GENERAL] newbie - postgresql or mysql

2005-09-01 Thread Chris Travers
Hi Frank; I will use your questions to help in the next version of my migration guide, but you might want to take a look at it anyway. You can find it at: http://www.metatrontech.com/wpapers/ It covers many areas of incompatibility between MySQL and PostgreSQL. My own suggestions is that yo

Re: [GENERAL] newbie - postgresql or mysql

2005-09-01 Thread Reid Thompson
Michael Fuhr wrote: > [Please copy the mailing list on replies so others can > contribute to and learn from the discussion. Also, please > don't top-post, as it destroys the flow of the discussion; > I've moved your questions to a more logical place.] > > On Wed, Aug 31, 2005 at 03:49:57PM -0600,

Re: [GENERAL] newbie - postgresql or mysql

2005-09-01 Thread Michael Fuhr
[Please copy the mailing list on replies so others can contribute to and learn from the discussion. Also, please don't top-post, as it destroys the flow of the discussion; I've moved your questions to a more logical place.] On Wed, Aug 31, 2005 at 03:49:57PM -0600, [EMAIL PROTECTED] wrote: > On W

Re: [GENERAL] newbie - postgresql or mysql

2005-08-31 Thread Dann Corbit
:pgsql-general- > [EMAIL PROTECTED] On Behalf Of Michael Fuhr > Sent: Wednesday, August 31, 2005 12:39 PM > To: Frank > Cc: Scott Marlowe; pgsql-general@postgresql.org > Subject: Re: [GENERAL] newbie - postgresql or mysql > > On Wed, Aug 31, 2005 at 03:17:29PM -0400, Frank wrot

Re: [GENERAL] newbie - postgresql or mysql

2005-08-31 Thread Scott Marlowe
On Wed, 2005-08-31 at 14:17, Frank wrote: > Thanks for clearing up some confusion. > > >>Look in the contrib/mysql directory in the source file (or install the > contrib packages for your system, assuming they come with that contrib > package<< It comes with the postgresql tar ball. just downlo

Re: [GENERAL] newbie - postgresql or mysql

2005-08-31 Thread Brian Wong
On 8/31/05, Frank <[EMAIL PROTECTED]> wrote: > I wanted to convert some apps over to use postgresql and cannot find > a good tool to import and auto create the tables. > MySQL syntax is not compatible with postgresql. > I get: > ERROR: syntax error at or near "`" at character 14 > from the MySQL o

Re: [GENERAL] newbie - postgresql or mysql

2005-08-31 Thread Michael Fuhr
On Wed, Aug 31, 2005 at 03:17:29PM -0400, Frank wrote: > This fails to insert records > > >> insert into category values > >> (4, 'Hardware - Monitor', 2, '2004-10-12 10:50:01'), > >> (5, 'Hardware - Printer', 2, '2004-10-12 10:50:02'), > >> (6, 'Hardware - Terminal', 2, '2004-10-12 10:50:02'),

  1   2   3   >