Re: [GENERAL] optimizing postgres

2007-07-13 Thread Richard Huxton
Zlatko Matić wrote: Hello, Tom. I don't understand relation between constraints and indexes. By using EMS PostgreSQL Manager Lite, I created indexes on columns, some of them are unique values. But when I open it in PgAdmin, all such "unique" indexes are listed as constraints and there are no i

Re: [GENERAL] optimizing postgres

2007-07-13 Thread PFC
The parsing has turned out to be pretty intense. It takes about 10-20 minutes for any project. When we are parsing data, it really slows down the site's response. I tested serving static webpages from apache, endless loops in php , but the choke point seems to be doing any other query on postgr

Re: [GENERAL] Limit number connections by IP

2007-07-13 Thread Stefan Kaltenbrunner
tabai wrote: > Hi > > I know that i can limited the total number of connections in > postgresql.conf with max_connections, but... can i limite the max > number of connections from an specific IP? > > For example y like have total max connections of 40 buy the same ip > can't have more than 5 con

Re: [GENERAL] Limit connections per username

2007-07-13 Thread Stefan Kaltenbrunner
Nik wrote: > PostgreSQL 8.2 on Windows 2003 Server. > > Is it possible to limit number of connections per username? yes - look for CONNECTION LIMIT on: http://www.postgresql.org/docs/8.2/static/sql-createrole.html and http://www.postgresql.org/docs/8.2/static/sql-alterrole.html Stefan ---

[GENERAL] how to measure performance slony

2007-07-13 Thread angga erwina
hi all, anybody can you tell me how to measure performance slony to replicate?? where site is i can get reference for this topik?? TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. http://tv.

Re: [GENERAL] Updates/Changes to a database

2007-07-13 Thread imageguy
On Jul 12, 4:03 pm, [EMAIL PROTECTED] (Steve Crawford) wrote: > imageguy wrote: > > I am building an application with Postrges as the backend foundation. > > This is my first application and it has struck me that as we add > > features/functionality to the application and database with each new > >

Re: [GENERAL] Force SSL / username combination

2007-07-13 Thread Robert Treat
On Friday 13 July 2007 05:21, Gregory Stark wrote: > "Robert Treat" <[EMAIL PROTECTED]> writes: > > I'm guessing the lack of response is due to a lack of knowledge on the > > topic. Personally I've never quite understood how you'd make use of the > > sslinfo functions to manage connections without

Re: [GENERAL] how to measure performance slony

2007-07-13 Thread Richard Huxton
angga erwina wrote: hi all, anybody can you tell me how to measure performance slony to replicate?? where site is i can get reference for this topik?? What "performance" are you trying to measure? -- Richard Huxton Archonet Ltd ---(end of broadcast)

Re: [GENERAL] Big table with UNION ALL or partitioning with Tsearch2

2007-07-13 Thread Simon Riggs
On Thu, 2007-07-12 at 11:19 -0700, Benjamin Arai wrote: > I am running the latest 8.2.4. I am using GIN. The data is static. I do > a batch upload every week of about 500GB and the ata is never touched > again, it is always add and never delete or update. Partitioning will certainly help the i

Re: [GENERAL] Force SSL / username combination

2007-07-13 Thread Gregory Stark
"Robert Treat" <[EMAIL PROTECTED]> writes: > I'm guessing the lack of response is due to a lack of knowledge on the topic. > Personally I've never quite understood how you'd make use of the sslinfo > functions to manage connections without something like on commit triggers, so > I hope you'll c

Re: [GENERAL] order is preserved by outer select?

2007-07-13 Thread Richard Huxton
Joshua N Pritikin wrote: Here's another easy (stupid?) question: SELECT data.* FROM (SELECT * FROM foo ORDER BY bar) AS data Will the returned rows still be ordered by bar? In practice, for this precise query, yes. However, embedding this into a larger query or adding a WHERE clause could

[GENERAL] order is preserved by outer select?

2007-07-13 Thread Joshua N Pritikin
Here's another easy (stupid?) question: SELECT data.* FROM (SELECT * FROM foo ORDER BY bar) AS data Will the returned rows still be ordered by bar? -- Make April 15 just another day, visit http://fairtax.org ---(end of broadcast)--- TIP 2: Don'

Re: [GENERAL] Updates/Changes to a database

2007-07-13 Thread Alexander Staubo
On 7/12/07, imageguy <[EMAIL PROTECTED]> wrote: Are there pre-existing tools out there that does this sort of thing ?? Rails and Django -- two popular web development frameworks -- support a simple mechanism for doing schema migrations. In Rails, in particular, each schema change is encapsulat

Re: [GENERAL] One Large Table or Multiple DBs?

2007-07-13 Thread Gregory Stark
"Mike" <[EMAIL PROTECTED]> writes: > Hi, > > What is efficient approach toward storing a web application's user > data. I would recommend one large DB with large tables. You might consider using partitioning to actually store the data separately. But even then I would not consider it until it wa

Re: [GENERAL] Restoring the DB from others user DB Backup.

2007-07-13 Thread Jim Nasby
On Jul 4, 2007, at 5:22 AM, Mavinakuli, Prasanna (STSD) wrote: We have 2 altogether databases owned by two different users.The requirement is ,by using a back up dump of a database owned by some other user,We will need to restore the other DB which is owned completely by other user. The problem

Re: [GENERAL] Accent-insensitive search

2007-07-13 Thread Alvaro Herrera
turbovince escribió: > Hello, I would like to perform some accent-insensitive searches on my > database, which means that a select query with condition, say, WHERE > NAME = 'HELLÔ' would return records where name is 'HELLO' as well. > > My data is encoded in Unicode (UTF8) and therefore I cannot u

Re: [GENERAL] Strange Problem

2007-07-13 Thread Jim Nasby
On Jul 9, 2007, at 9:22 AM, Gustavo Ces wrote: Hi all, I´ve got a strange problem, hope you could help. I´ve got a table (a ) with n tuples, and two fields , birthplace and birth date. There´s another table ( say b) with m tuples, where i´ve got a lot of polygons ( with their code, sam

Re: [GENERAL] Fastest way to join materalized view to child tables

2007-07-13 Thread Jim Nasby
On Jul 9, 2007, at 10:07 PM, Postgres User wrote: materialized view - view_a child tables - table_a, table_b, table_c Here's my question- what's the fastest what to retrieve rows from each of the child tables after I get results from view_a ? I don't like using temp tables in Postgres (

Re: [GENERAL] Function to ADD a value into each column of real[]

2007-07-13 Thread Jim Nasby
On Jul 10, 2007, at 2:38 PM, orehon wrote: Hello, if I have this table: CREATE TABLE teste ( id integer, picos real[], ); and insert this values: INSERT INTO teste VALUES(1, '{{1,2,3},{1,2,3},{1,2,3},{1,2,3}, {1,2,3}}'); INSERT INTO teste VALUES(2, '{{1,2,3},{1,2,3},{1,2,3},{1,2,3},{1,2,

Re: [GENERAL] TOAST, large objects, and ACIDity

2007-07-13 Thread Jim Nasby
On Jul 10, 2007, at 3:47 AM, Benoit Mathieu wrote: I want to use postgres to store data and large files, typically audio files from 100ko to 20Mo. For those files, I just need to store et retrieve them, in an ACID way. (I don't need search, or substring, or others functionnalities) I saw pos

Re: [GENERAL] how to resolve invalid primary checkpoint

2007-07-13 Thread Jim Nasby
On Jul 10, 2007, at 4:08 AM, lim siang min wrote: I'm new to Postgresql and need to support on any IT related problem. One of my customer not able to start the postgresql services. The log said that .. record with zero length at 0/2E16910 invalid primary checkpoint record record with zero length

[GENERAL] multirow insert

2007-07-13 Thread Zlatko Matić
When using multirow INSERT INTO...VALUES command, are all rows inserted in a batch, or row by row? Regards, Zlatko

Re: [GENERAL] multirow insert

2007-07-13 Thread A. Kretschmer
am Fri, dem 13.07.2007, um 18:50:26 +0200 mailte Zlatko Mati? folgendes: > When using multirow INSERT INTO...VALUES command, are all rows inserted in a > batch, or row by row? Within one transaction, yes. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -

[GENERAL] restore dump to 8.19

2007-07-13 Thread mljv
Hi i tried to restore a dump from version 8.1.8 to 8.1.9 and i had in one table a value "1.7383389519587511e-310" i got the following error message: pg_restore: ERROR: type "double precision" value out of range: underflow CONTEXT: COPY gesamtpunktecache, line 925001, column gc_gesamtsiege: "

Re: [GENERAL] restore dump to 8.19

2007-07-13 Thread Jim Nasby
On Jul 13, 2007, at 2:11 PM, [EMAIL PROTECTED] wrote: i tried to restore a dump from version 8.1.8 to 8.1.9 and i had in one table a value "1.7383389519587511e-310" i got the following error message: pg_restore: ERROR: type "double precision" value out of range: underflow CONTEXT: COPY g

[GENERAL] pg_dump vs schemas

2007-07-13 Thread Francisco Reyes
pg_dump by default puts at the top SET search_path = public,pg_catalog; This considering a plain vanilla setup where no schemas other than public have been created. I however noticed that pg_dump also does this: ALTER TABLE public.mytable OWNER TO pgsql; Shouldn't the "public." be left out?

Re: [GENERAL] multirow insert

2007-07-13 Thread Tom Allison
On Jul 13, 2007, at 2:11 PM, A. Kretschmer wrote: am Fri, dem 13.07.2007, um 18:50:26 +0200 mailte Zlatko Mati? folgendes: When using multirow INSERT INTO...VALUES command, are all rows inserted in a batch, or row by row? Within one transaction, yes. Trust me... It's MUCH faster then

Re: [GENERAL] pg_dump vs schemas

2007-07-13 Thread Michael Glaesemann
On Jul 13, 2007, at 19:10 , Francisco Reyes wrote: Alternatively is there any easy way to take all data in one schema and load it into a target DB and a different schema? You might try using the -n flag with pg_dump, replace schema1 with schema2 in the dump file, and loading the altered du

[GENERAL] PostgreSQL equivelant of this MySQL query

2007-07-13 Thread Madison Kelly
Hi all, I am reading through some docs on switching to Postfix with a SQL backend. The docs use MySQL but I want to use PgSQL so I am trying to adapt as I go. I am stuck though; can anyone help give me the PgSQL equiv. of: SELECT CONCAT(SUBSTRING_INDEX(usr_email,'@',-1),'/',SUBSTRING_INDE

Re: [GENERAL] PostgreSQL equivelant of this MySQL query

2007-07-13 Thread Madison Kelly
Madison Kelly wrote: Hi all, I am reading through some docs on switching to Postfix with a SQL backend. The docs use MySQL but I want to use PgSQL so I am trying to adapt as I go. I am stuck though; can anyone help give me the PgSQL equiv. of: SELECT CONCAT(SUBSTRING_INDEX(usr_email,'@',

Re: [GENERAL] PostgreSQL equivelant of this MySQL query

2007-07-13 Thread Steve Atkins
On Jul 13, 2007, at 6:39 PM, Madison Kelly wrote: Hi all, I am reading through some docs on switching to Postfix with a SQL backend. The docs use MySQL but I want to use PgSQL so I am trying to adapt as I go. I am stuck though; can anyone help give me the PgSQL equiv. of: SELECT CONC

Re: [GENERAL] pg_dump vs schemas

2007-07-13 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > I however noticed that pg_dump also does this: > ALTER TABLE public.mytable OWNER TO pgsql; > Shouldn't the "public." be left out? Probably in an ideal world, but that code is far from ideal --- it's dealing with a bunch of considerations including co

Re: [GENERAL] PostgreSQL equivelant of this MySQL query

2007-07-13 Thread Madison Kelly
Steve Atkins wrote: On Jul 13, 2007, at 6:39 PM, Madison Kelly wrote: Hi all, I am reading through some docs on switching to Postfix with a SQL backend. The docs use MySQL but I want to use PgSQL so I am trying to adapt as I go. I am stuck though; can anyone help give me the PgSQL equiv.