Re: [GENERAL] INSERT .... RETURNING

2008-11-05 Thread Rafal Pietrak
On Wed, 2008-11-05 at 14:38 -0500, Merlin Moncure wrote: [] > > > >> It's more complicated than it looks (triggers). > > > > Could you give me pointers where I could get some more information on [] > matter, the system has several not-easily-removed assumptions that a > SELECT command won

Re: [GENERAL] [ADMIN] Installation Error of postgresql-8.1.5 with perl.

2008-11-05 Thread praveen
Thanks a lot , Tom Lane. I installed below mentioned RPMs and now it is working - Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: "praveen" <[EMAIL PROTECTED]> Cc: ; <[EMAIL PROTECTED]> Sent: Wednesday, November 05, 2008 8:54 PM Subject: Re: [ADMIN] Installation Error of po

Re: [GENERAL] Read only access, via functions only

2008-11-05 Thread Craig Ringer
Webb Sprague wrote: >> you can set transactions read only but the user can turn them off. Use >> views, functions and GRANT. > > Views was the key word. I had tried to do it with functions and GRANT alone. You can also do a lot with SECURITY DEFINER functions - for example, if you want to grant

Re: [GENERAL] Storage location of temporary files

2008-11-05 Thread Scott Marlowe
On Wed, Nov 5, 2008 at 8:22 PM, Gregory Stark <[EMAIL PROTECTED]> wrote: > > "Scott Marlowe" <[EMAIL PROTECTED]> writes: > >> 2008/11/5 Christian Schröder <[EMAIL PROTECTED]>: >>> Tomasz Ostrowski wrote: This is wrong. RAID5 is slower than RAID1. You should go for RAID1+0 for fast an

Re: [GENERAL] Storage location of temporary files

2008-11-05 Thread Gregory Stark
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > 2008/11/5 Christian Schröder <[EMAIL PROTECTED]>: >> Tomasz Ostrowski wrote: >>> >>> This is wrong. RAID5 is slower than RAID1. >>> You should go for RAID1+0 for fast and reliable storage. Or RAID0 for >>> even faster but unreliable. >>> >> >> I did n

Re: [GENERAL] temporary memory configuration

2008-11-05 Thread Scott Marlowe
On Wed, Nov 5, 2008 at 8:09 AM, Grzegorz Jaśkiewicz <[EMAIL PROTECTED]> wrote: > hey folks, > > so suppose I have a query that in explain analyze > > Sort Method: external merge Disk: 218080kB > > What param should I set to high up, to end up with that sort in memory, and work_mem > also - will t

Re: [GENERAL] Read only access, via functions only

2008-11-05 Thread Webb Sprague
> you can set transactions read only but the user can turn them off. Use > views, functions and GRANT. Views was the key word. I had tried to do it with functions and GRANT alone. Thanks to the collective brain that is a listserv. -W -- Sent via pgsql-general mailing list (pgsql-general@postgr

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-11-05 Thread Dann Corbit
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-general- > [EMAIL PROTECTED] On Behalf Of Ivan Voras > Sent: Wednesday, November 05, 2008 3:28 PM > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Are there plans to add data compression feature > to postgresql? > > Pe

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Tom Lane
"Andrus" <[EMAIL PROTECTED]> writes: > As you see simply removing constant expression > '0' or > produces different query plan which is much faster for large amoutnts of > data. The IN-pullup code runs before constant-simplification does, so it doesn't see that as a simple join condition.

Re: [GENERAL] Read only access, via functions only

2008-11-05 Thread Joshua D. Drake
On Wed, 2008-11-05 at 15:46 -0800, Webb Sprague wrote: > Hi all > > Is there a away to set up a schema such that a certain role has (1) > read only access to (2) all the tables, but (3) must use predefined > functions to use that access? you can set transactions read only but the user can turn th

Re: [GENERAL] Read only access, via functions only

2008-11-05 Thread ries van Twisk
On Nov 5, 2008, at 6:46 PM, Webb Sprague wrote: Hi all Is there a away to set up a schema such that a certain role has (1) read only access to (2) all the tables, but (3) must use predefined functions to use that access? Items 1 and 2 are so that the end user doesn't stomp on the data. I wan

[GENERAL] Read only access, via functions only

2008-11-05 Thread Webb Sprague
Hi all Is there a away to set up a schema such that a certain role has (1) read only access to (2) all the tables, but (3) must use predefined functions to use that access? Items 1 and 2 are so that the end user doesn't stomp on the data. I want item 3 in order to force the application programme

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-11-05 Thread Joshua D. Drake
On Thu, 2008-11-06 at 00:27 +0100, Ivan Voras wrote: > Peter Eisentraut wrote: > > Craig Ringer wrote: > >> So - it's potentially even worth compressing the wire protocol for use > >> on a 100 megabit LAN if a lightweight scheme like LZO can be used. Yes compressing the wire protocol is a benefit.

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-11-05 Thread Ivan Voras
Peter Eisentraut wrote: > Craig Ringer wrote: >> So - it's potentially even worth compressing the wire protocol for use >> on a 100 megabit LAN if a lightweight scheme like LZO can be used. > > LZO is under the GPL though. But liblzf is BSD-style. http://www.goof.com/pcg/marc/liblzf.html sign

Re: [GENERAL] Storage location of temporary files

2008-11-05 Thread Scott Marlowe
2008/11/5 Christian Schröder <[EMAIL PROTECTED]>: > Tomasz Ostrowski wrote: >> >> This is wrong. RAID5 is slower than RAID1. >> You should go for RAID1+0 for fast and reliable storage. Or RAID0 for >> even faster but unreliable. >> > > I did not find a clear statement about this. I agree that RAID1

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Andrus
PG 8.3 would even throw it out, unless dokumnr was explicitly cast to a float8 as well. I tried in 8.3 create temp table dok ( dokumnr serial primary key ); select * from dok where dokumnr='1'::float8 and this run without error. So i do'nt understand how 8.3 throws out. Andrus. -- Sent via

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Andrus
Did you read what I wrote? Cause you just repeated it as an argument against my point. Lets re-visit the second issue in my reply. I tried in 8.3 explain SELECT dokumnr FROM DOK where dokumnr IN (1227714) AND ( '0' or dokumnr IN (SELECT dokumnr FROM firma1.bilkaib ) ) "Inde

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Sam Mason
On Wed, Nov 05, 2008 at 11:42:12PM +0200, Andrus wrote: > Scott Marlowe wrote: > >You do realize that a float is not an exact number. What you and I > >see as 1228137 might really be, internally, 1228136. ? > > My query contains > '1228137'::float8 > I do'nt see > 1228136.

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Andrus
explain analyze select * from firma2.dok where dokumnr='1228137'::float8 "Seq Scan on dok (cost=0.00..187766.23 rows=6255 width=1145) (actual time=43168.460..43176.063 rows=1 loops=1)" " Filter: ((dokumnr)::double precision = 1228137::double precision)" "Total runtime: 43176.375 ms" I've jus

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Sam Mason
On Wed, Nov 05, 2008 at 02:21:33PM -0700, Scott Marlowe wrote: > On Wed, Nov 5, 2008 at 11:52 AM, Andrus <[EMAIL PROTECTED]> wrote: > > explain analyze select * from firma2.dok where dokumnr='1228137'::float8 > > > > How to force PostgreSql to speed up without changing query ? > > Stop trying to

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Scott Marlowe
On Wed, Nov 5, 2008 at 2:42 PM, Andrus <[EMAIL PROTECTED]> wrote: >> Stop trying to compare exact and inexact types? >> >> You do realize that a float is not an exact number. What you and I >> see as 1228137 might really be, internally, 1228136. ? >> So it won't get an exact match.

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Andrus
Stop trying to compare exact and inexact types? You do realize that a float is not an exact number. What you and I see as 1228137 might really be, internally, 1228136. ? So it won't get an exact match. What's wrong with trying to match to an exact number instead? My query cont

[GENERAL] Speeding up startswith query

2008-11-05 Thread Andrus
I ran analyze and tried command explain analyze SELECT * FROM dok WHERE doktyyp=E'O' AND ('0'::float8 =0 or dok.tasumata<>0) AND ('0'::float8 =0 or NOT dok.taidetud) AND dok.sihtyksus LIKE 'RIISIPERE%' ESCAPE '!' AND kuupaev BETWEEN '2008-05-01' AND '2999-08-31' ORDER BY dokumnr LIM

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-05 Thread Jason Long
Greg Smith wrote: On Mon, 3 Nov 2008, Jason Long wrote: For some reason Postgres is pegging my CPU and I can barely log on to reboot the machine. Take a look at pg_stat_activity when this happens to see what's going on. Also, try running "top -c" to see what is going on (the -c displays ext

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Scott Marlowe
On Wed, Nov 5, 2008 at 11:52 AM, Andrus <[EMAIL PROTECTED]> wrote: > I have table with index > > CREATE TABLE firma2.dok( > ... > dokumnr serial NOT NULL, > ... > CONSTRAINT dok_pkey PRIMARY KEY (dokumnr), > ... > ); > > CREATE INDEX dok_dokumnr_idx > ON firma2.dok > USING btree > (dokumnr); >

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Sam Mason
On Wed, Nov 05, 2008 at 08:52:50PM +0200, Andrus wrote: > explain analyze select * from firma2.dok where dokumnr='1228137'::float8 > > "Seq Scan on dok (cost=0.00..187766.23 rows=6255 width=1145) (actual > time=43168.460..43176.063 rows=1 loops=1)" > " Filter: ((dokumnr)::double precision = 12

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-05 Thread Greg Smith
On Mon, 3 Nov 2008, Jason Long wrote: For some reason Postgres is pegging my CPU and I can barely log on to reboot the machine. Take a look at pg_stat_activity when this happens to see what's going on. Also, try running "top -c" to see what is going on (the -c displays extra information for

Re: [GENERAL] Speeding up query

2008-11-05 Thread Alvaro Herrera
Sam Mason wrote: > On Wed, Nov 05, 2008 at 09:52:29PM +0200, Andrus wrote: > > after that I got > > > > 1 1214 pg_shdepend 440 MB > > 2 1232 pg_shdepend_depender_index 285 MB > > 3 1233 pg_shdepend_referenc

Re: [GENERAL] Speeding up query

2008-11-05 Thread Sam Mason
On Wed, Nov 05, 2008 at 09:52:29PM +0200, Andrus wrote: > >You really could do with updating that; 8.1.4 is very old. 8.1.15 is > >the latest in the 8.1 series and has lots of bug fixes. > > Will update increase speed ? > Server is running for approx 4 years now and I havent encountered any bugs.

Re: [GENERAL] Best way to debug user defined type

2008-11-05 Thread Tom Lane
CG <[EMAIL PROTECTED]> writes: > I'm trying to debug a C function that is used for the binary send/receive > part of a user defined type. I can debug the send part fine, but the receive > part takes an input parameter of type "internal", and I can't seem to conjure > up an "internal" to feed to

Re: [GENERAL] Speeding up query

2008-11-05 Thread Andrus
You really could do with updating that; 8.1.4 is very old. 8.1.15 is the latest in the 8.1 series and has lots of bug fixes. Will update increase speed ? Server is running for approx 4 years now and I havent encountered any bugs. Db size is 862 MB Bigger tables: 1 1214 pg_shdepe

Re: [GENERAL] INSERT .... RETURNING

2008-11-05 Thread Merlin Moncure
On Wed, Nov 5, 2008 at 11:20 AM, Rafal Pietrak <[EMAIL PROTECTED]> wrote: > Hi, > > On Wed, 2008-11-05 at 10:34 -0500, Merlin Moncure wrote: >> On Wed, Nov 5, 2008 at 2:41 AM, Rafal Pietrak <[EMAIL PROTECTED]> wrote: >> > Hi Everybody, > [...] >> > I've just upgraded to v8.3.4 ... since eventually

[GENERAL] Best way to debug user defined type

2008-11-05 Thread CG
I'm trying to debug a C function that is used for the binary send/receive part of a user defined type. I can debug the send part fine, but the receive part takes an input parameter of type "internal", and I can't seem to conjure up an "internal" to feed to my function to test if the output is wo

Re: [GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Sam Mason
On Wed, Nov 05, 2008 at 08:52:50PM +0200, Andrus wrote: > explain analyze select * from firma2.dok where dokumnr='1228137'::float8 > > "Seq Scan on dok (cost=0.00..187766.23 rows=6255 width=1145) (actual > time=43168.460..43176.063 rows=1 loops=1)" > " Filter: ((dokumnr)::double precision = 12

Re: [GENERAL] Speeding up query

2008-11-05 Thread Sam Mason
On Wed, Nov 05, 2008 at 07:51:24PM +0200, Andrus wrote: > I have Server running on Windows XP using > PostgreSQL 8.1.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 > (mingw-special) You really could do with updating that; 8.1.4 is very old. 8.1.15 is the latest in the 8.1 series and ha

Re: [GENERAL] Speeding up query

2008-11-05 Thread Alan Hodgson
On Wednesday 05 November 2008, "Andrus" <[EMAIL PROTECTED]> wrote: > takes 34 seconds. Tables are indexed and logfile shows autovacuum > running. I ran VACUUM ANALYZE. > It returns > > INFO: free space map contains 22501 pages in 77 relations > DETAIL: A total of 2 page slots are in use (incl

[GENERAL] How to use index in WHERE int = float

2008-11-05 Thread Andrus
I have table with index CREATE TABLE firma2.dok( ... dokumnr serial NOT NULL, ... CONSTRAINT dok_pkey PRIMARY KEY (dokumnr), ... ); CREATE INDEX dok_dokumnr_idx ON firma2.dok USING btree (dokumnr); I ran analyze command on it. explain analyze select * from firma2.dok where dokumnr='12281

Re: [GENERAL] gin creation and previous history of server

2008-11-05 Thread Tom Lane
Ivan Sergio Borgonovo <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> wrote: >> Can you put together a self-contained test case that illustrates >> this? > I'm trying... Tonight I just let my long transaction run all night. > It has been running for about 10h and it blocked on index > r

Re: [GENERAL] worker took too long to start; cancelled

2008-11-05 Thread Alvaro Herrera
Robert Fitzpatrick wrote: > After getting it back up, I find this in the logs... > > Nov 4 08:09:50 esmtp postgres[769]: [6-1] WARNING: worker took too > long to start; cancelled > > I have this every minute prior to the crash about 5 or 6 times. This means that an autovacuum worker could not

Re: [GENERAL] storing passwords

2008-11-05 Thread Steve Atkins
On Nov 5, 2008, at 9:59 AM, Laurent Wandrebeck wrote: 2008/11/5 Brandon Metcalf <[EMAIL PROTECTED]>: We have a number of automated jobs that connect to our pgsql DB and I'm wondering what others are doing for authentication and securing passwords. It's easy enough to hardcode a password, but

Re: [GENERAL] Storage location of temporary files

2008-11-05 Thread Martijn van Oosterhout
On Wed, Nov 05, 2008 at 08:13:10AM +0100, Christian Schröder wrote: > Tomasz Ostrowski wrote: > >This is wrong. RAID5 is slower than RAID1. > >You should go for RAID1+0 for fast and reliable storage. Or RAID0 for > >even faster but unreliable. > > > I did not find a clear statement about this. I

Re: [GENERAL] storing passwords

2008-11-05 Thread Laurent Wandrebeck
2008/11/5 Brandon Metcalf <[EMAIL PROTECTED]>: > We have a number of automated jobs that connect to our pgsql DB and > I'm wondering what others are doing for authentication and securing > passwords. It's easy enough to hardcode a password, but is there > something specific to pgsql, perhaps, that

[GENERAL] Speeding up query

2008-11-05 Thread Andrus
I have Server running on Windows XP using PostgreSQL 8.1.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special) Db size is 862 MB 8 users Bigger tables: 1 1214 pg_shdepend 775 MB 2 1232 pg_shdepend_depender_index 285 M

[GENERAL] storing passwords

2008-11-05 Thread Brandon Metcalf
We have a number of automated jobs that connect to our pgsql DB and I'm wondering what others are doing for authentication and securing passwords. It's easy enough to hardcode a password, but is there something specific to pgsql, perhaps, that would be a better solution? Thanks. -- Brandon --

Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-05 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Maybe we should just agree that its argument is a pattern for the >> castsource type's name? > I'd say it could be a pattern for both source and target. Often times I > am interested in casts in either direction. Well, it makes t

[GENERAL] worker took too long to start; cancelled

2008-11-05 Thread Robert Fitzpatrick
I have a FreeBSD server with Postfix that filters mail using amavisd-maia+SA+ClamAV. It crashed when we received an SMTP attack that traced back to a compromised user login and a flood a messages were sent to this smarthost. After getting it back up, I find this in the logs... Nov 4 08:09:50 esmt

Re: [GENERAL] gin creation and previous history of server

2008-11-05 Thread Ivan Sergio Borgonovo
On Wed, 05 Nov 2008 10:53:38 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > Ivan Sergio Borgonovo <[EMAIL PROTECTED]> writes: > > Tom Lane <[EMAIL PROTECTED]> wrote: > >> Can you put together a self-contained test case that illustrates > >> this? > > > I'm trying... Tonight I just let my long transa

Re: [GENERAL] xlog viewer

2008-11-05 Thread Alvaro Herrera
H.J. Sanders wrote: > > Hello. > > Does someone have a tool to read xlog? http://xlogviewer.projects.postgresql.org/ -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] postgresql and Mac OS X

2008-11-05 Thread Shane Ambler
Tom Allison wrote: It confirms what I'm working through. crt1.o located at /Developer/SDKs/MacOSX10.5.sdk/usr/lib/crt1.o crt1.10.5.0 at /Developer/SDKs/MacOSX10.5.sdk/usr/lib/crt1.10.5.o So I'm trying to find how to get these directories included in the compilation. I thought --with-libs and

[GENERAL] xlog viewer

2008-11-05 Thread H.J. Sanders
Hello. Does someone have a tool to read xlog? Nothing high-tech , just simple to read it in ascii. Thanks Henk Sanders

Re: [GENERAL] INSERT .... RETURNING

2008-11-05 Thread Rafal Pietrak
Hi, On Wed, 2008-11-05 at 10:34 -0500, Merlin Moncure wrote: > On Wed, Nov 5, 2008 at 2:41 AM, Rafal Pietrak <[EMAIL PROTECTED]> wrote: > > Hi Everybody, [...] > > I've just upgraded to v8.3.4 ... since eventually it does have > > INSERT ... RETURNING extention to the SQL standard. > > > > The doc

Re: [GENERAL] INSERT .... RETURNING

2008-11-05 Thread Merlin Moncure
On Wed, Nov 5, 2008 at 2:41 AM, Rafal Pietrak <[EMAIL PROTECTED]> wrote: > Hi Everybody, > > Forgive my sarcasm below, but I just *adore* postgres for years, now. I > hope it's all natural with this level of emotions to be deeply hurt when > the object of attraction is (to quote HHTTG by Douglas Ad

Re: [GENERAL] Visualizer

2008-11-05 Thread Albe Laurenz
Mohammad Ali Darvish Darab wrote: > I have got an already existing Porstgres DB which is pretty large > (including more than 650 table with considerable number of constraints > etc). And now I am supposed to realize generally how it is constructed > and works. I thought it would be good to have a

Re: [GENERAL] Error in starting Postgresql...

2008-11-05 Thread Serge Fonville
Have you checked the logsWhat have you configured What os are you using What version of postgresql Have you run netstat to check for port 5432 Regards, Serge Fonville On Wed, Nov 5, 2008 at 4:11 PM, Joshua Tolley <[EMAIL PROTECTED]> wrote: > On Wed, Nov 05, 2008 at 08:34:55PM +0530, Shashank Mu

Re: [GENERAL] [ADMIN] Installation Error of postgresql-8.1.5 with perl.

2008-11-05 Thread Tom Lane
"praveen" <[EMAIL PROTECTED]> writes: > During configure I find the error in config.log file > checking for flags to link embedded Perl... Can't locate ExtUtils/Embed.pm > in @INC (@INC contains: /usr/lib/perl5/5.10.0/i386-linux-thread-multi Well, there's your problem ... FYI, our current Fedor

Re: [GENERAL] Error in starting Postgresql...

2008-11-05 Thread Joshua Tolley
On Wed, Nov 05, 2008 at 08:34:55PM +0530, Shashank Mujumdar wrote: > After installing dspace when I tried to connect it to the postgresql > server it gave the following error. > > psql -U postgres -h localhost ( command used ) > > the error was > > psql: could not connect to server: Connection

[GENERAL] temporary memory configuration

2008-11-05 Thread Grzegorz Jaśkiewicz
hey folks, so suppose I have a query that in explain analyze Sort Method: external merge Disk: 218080kB What param should I set to high up, to end up with that sort in memory, and also - will that memory will always be allocated per connection, (I am bit worried that having say 320MB of temporary

Re: [GENERAL] gin creation and previous history of server

2008-11-05 Thread Ivan Sergio Borgonovo
On Tue, 04 Nov 2008 10:33:26 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > Ivan Sergio Borgonovo <[EMAIL PROTECTED]> writes: > > It seems that gin creation is triggering something nasty in the > > server that depends on previous history of the server. > > Can you put together a self-contained test

[GENERAL] Error in starting Postgresql...

2008-11-05 Thread Shashank Mujumdar
After installing dspace when I tried to connect it to the postgresql server it gave the following error. psql -U postgres -h localhost ( command used ) the error was psql: could not connect to server: Connection refused (0X274D/10061) Is the server running on host "localhost" and

Re: [GENERAL] COPY TO duplicates "\" signs

2008-11-05 Thread Ivan Sergio Borgonovo
On Wed, 5 Nov 2008 05:06:36 -0600 "Abraham, Danny" <[EMAIL PROTECTED]> wrote: > Hi, > > String in DB: > > D:\Program Files\BMC Software\CONTROL-D\wa/reports > > In the output files "\| are duplicated: The string in the output > text fileis > D:\\Program Files\\BMC Software\\CONTROL-D\\wa/report

Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-05 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Could we change the data types of the pg_cast table to regprocedure and > regtype instead? Back when we first introduced the reg-foo types, there was some discussion of changing all relevant catalog columns to those types, but the idea crashed and bu

Re: [GENERAL] COPY TO duplicates "\" signs

2008-11-05 Thread Albe Laurenz
Abraham, Danny wrote: > String in DB: > > D:\Program Files\BMC Software\CONTROL-D\wa/reports > > In the output files "\| are duplicated: The string in the output text > fileis > D:\\Program Files\\BMC Software\\CONTROL-D\\wa/reports > == ==== == > > Standard_con

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-11-05 Thread Albe Laurenz
Michelle Konzack wrote: > > I think you want a sequence. Give the serial number the type bigserial or > > serial. See > > http://www.postgresql.org/docs/current/static/functions-sequence.html for > > more. > > OK, thats cool... I have found an example in "sql-createsequence.html" > > CREATE SEQ

[GENERAL] [pgsql-general] cant find postgres executable after initdb

2008-11-05 Thread Willy-Bas Loos
Hi, I have a pgsql 8.3.3 cluster running on windows. I want to install another cluster, so i use initdb. Because the postgres user must own the files, i use runas to run initdb as postgres2 (the correct user here). I've created a separate folder for the data files of this cluster. The folder is ow

Re: [GENERAL] Visualizer

2008-11-05 Thread Matthias Karlsson
DbVisualizer is a tool I have used in the past for exactly this. // Matthias On Wed, Nov 5, 2008 at 1:18 PM, Mohammad Ali Darvish Darab <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I have got an already existing Porstgres DB which is pretty large > (including more than 650 table with consid

Re: [GENERAL] Visualizer

2008-11-05 Thread Thomas Kellerer
Mohammad Ali Darvish Darab, 05.11.2008 13:18: Hello everybody, I have got an already existing Porstgres DB which is pretty large (including more than 650 table with considerable number of constraints etc). And now I am supposed to realize generally how it is constructed and works. I thought it w

[GENERAL] Visualizer

2008-11-05 Thread Mohammad Ali Darvish Darab
Hello everybody, I have got an already existing Porstgres DB which is pretty large (including more than 650 table with considerable number of constraints etc). And now I am supposed to realize generally how it is constructed and works. I thought it would be good to have a grapahical visualization

Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-05 Thread Peter Eisentraut
Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: Tom Lane escribi�: regression=# select casttarget::regtype,castcontext,castfunc::regprocedure from pg_cast where castsource = 'time'::regtype; BTW it very much looks like we should have a pg_casts view that displays these things in

Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-05 Thread Peter Eisentraut
Alvaro Herrera wrote: Tom Lane escribió: However, the interval version of the function can capture the time case because there's an implicit cast from time to interval: regression=# select casttarget::regtype,castcontext,castfunc::regprocedure from pg_cast where castsource = 'time'::regtype;

Re: [GENERAL] postgresql and Mac OS X

2008-11-05 Thread adam_pgsql
When I do the install script in contrib it says I have no rights to the directory. It was in /usr/local/pgsql/data/log and I changed it to /usr/local/pgsql/log. It was set as root.wheel with 755 permissions so I suspect it's mad at me because the postgres user was left in the cold. Have

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-11-05 Thread Craig Ringer
Michelle Konzack wrote: Hello Michael, Am 2008-10-31 11:15:54, schrieb Michael Hall: I have a table where I have a serialnumber which shuld be increased be each INSERT. I know I can use max() to get the highest number, but how can I use it in a INSERT statement? Have a look in the manual f

Re: [GENERAL] Error al crea r una base en español.....

2008-11-05 Thread Alvaro Herrera
Eduardo Arévalo escribió: > hola quiero crear una base que soporte caracteres en español y le doy este > comando pero no crea la base sino me manda este error: > > -bash-3.2$ ./createdb --encoding=LATIN1 sig_spa_prueba > Password: > createdb: database creation failed: ERROR: encoding LATIN1 does

Re: [GENERAL] postgresql and Mac OS X

2008-11-05 Thread Tom Allison
Tom Allison wrote: Scott Ribe wrote: 'make' is prefixed by /Developer/usr/bin/. The question is *why* the location is nonstandard. Starting with Xcode 3, all the developer tools get installed under the Developer directory, in order to allow one to easily have multiple versions of Xcode inst

[GENERAL] COPY TO duplicates "\" signs

2008-11-05 Thread Abraham, Danny
Hi, String in DB: D:\Program Files\BMC Software\CONTROL-D\wa/reports In the output files "\| are duplicated: The string in the output text fileis D:\\Program Files\\BMC Software\\CONTROL-D\\wa/reports == ==== == Standard_conforming_strings will not help here.

Re: [Fwd: Re: [GENERAL] GEQO randomness?]

2008-11-05 Thread Joshua Tolley
On Fri, Oct 31, 2008 at 06:57:25PM -0400, Eric Schwarzenbach wrote: > > My problem with GEQO using a random number generator is that > non-deterministic behavior is really hard to debug, and problems can go > undiagnosed for ages. Frankly I would rather something fail all the > time, than it work

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-11-05 Thread Joshua Tolley
On Sat, Nov 01, 2008 at 02:24:37PM +0100, Michelle Konzack wrote: > Du I need to create a SEQUENCE for each table or do I need only ONE of > if and can use it independant on differnt tables? If you just create a bunch of tables with SERIAL or BIGSERIAL columns, it will create one sequence for ea

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-11-05 Thread Craig Ringer
Michelle Konzack wrote: Hello Grzegorz, Am 2008-10-31 13:39:46, schrieb Grzegorz Ja??kiewicz: AUTOINCREMENT has so many problems, that soon you'll start to love sequences so much, you'll start to hate mysql's childlish approach to problem solving :) OK, you hit me, I am trying to convert a my

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-11-05 Thread Michelle Konzack
Hello Michael, Am 2008-10-31 11:15:54, schrieb Michael Hall: > > I have a table where I have a serialnumber which shuld be increased be > > each INSERT. I know I can use max() to get the highest number, but how > > can I use it in a INSERT statement? > > Have a look in the manual for the SERI

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-11-05 Thread Michelle Konzack
Hello Grzegorz, Am 2008-10-31 13:39:46, schrieb Grzegorz Ja??kiewicz: > AUTOINCREMENT has so many problems, that soon you'll start to love sequences > so much, you'll start to hate mysql's childlish approach to problem solving > :) OK, you hit me, I am trying to convert a mysql scheme to postgres

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-11-05 Thread Michelle Konzack
Hello Nikolas, Am 2008-10-31 09:44:50, schrieb Nikolas Everett: > I think you want a sequence. Give the serial number the type bigserial or > serial. See > http://www.postgresql.org/docs/current/static/functions-sequence.html for > more. OK, thats cool... I have found an example in "sql-create

[GENERAL] INSERT .... RETURNING

2008-11-05 Thread Rafal Pietrak
Hi Everybody, Forgive my sarcasm below, but I just *adore* postgres for years, now. I hope it's all natural with this level of emotions to be deeply hurt when the object of attraction is (to quote HHTTG by Douglas Adams): " almost, but not quite entirely unlike tea". I've just upgraded to v8

Re: [GENERAL] postgresql installation - PL/???

2008-11-05 Thread Albe Laurenz
Tom Allison wrote: > This should be a dumb question: > > --with-perl > > I don't see that I have to do this in order to load pl/perl as a > function/trigger language option. So I should assume that this will > compile pl/perl in rather than having it available as a loadable > function. Nice f

Re: [GENERAL] Storage location of temporary files

2008-11-05 Thread Tomasz Ostrowski
On 2008-11-05 08:13, Christian Schröder wrote: > If I have 5 disks available, how should I use them to get best > performance without the risk of severe data loss? What percentage of your usage are writes? What do you need the most: high throughput or minimal latency? > How important is data in