Re: [GENERAL] uninstalling postgre sql on Fedora core 5

2007-01-18 Thread Devrim GUNDUZ
Hi, On Fri, 2007-01-19 at 14:07 +1100, Chris wrote: > rpm -qa | grep -i 'postgres' > > find the package names, then > > rpm -e pkg1 pkg2 pkg3 etc or: rpm -e `rpm -qa|grep postgresql` Regards, -- The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 PostgreSQL Replication, Consulting, C

Re: [GENERAL] trigger question

2007-01-18 Thread A. Kretschmer
am Tue, dem 16.01.2007, um 18:35:56 +0100 mailte Furesz Peter folgendes: > Hello, > > I have a table named foobar and I don't want to allow from DELETE or > UPDATE its rows. > > I have a table as described below: > foobar(foobar_id, value, is_deleted); > > I don't want to allow directly delet

Re: [GENERAL] help me to solve the problem

2007-01-18 Thread Chris
Thobiyas wrote: Dear /Sir I am Attmepting follwoing this problem if I Create Database or retore database i am facing following this problem psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domai

Re: [GENERAL] how to show serial number of record

2007-01-18 Thread A. Kretschmer
am Thu, dem 18.01.2007, um 15:34:33 +0530 mailte deepak pal folgendes: > hi i want to add a coloum called serial numer in my record set how could i do > it..that column is not in table. Do you mean something like this:? test=# create table foo (t text); CREATE TABLE test=*# insert into foo value

[GENERAL] EnterpriseDB Apology

2007-01-18 Thread Denis Lussier
Hi All, EnterpriseDB recently sent out email advertising new support offerings. Unfortunately, the email was incorrectly sent to some people who should not have received it. We apologize for the error, and are taking steps to avoid such mistakes in the future. -Denis Lussier CTO & Founder http:

Re: [GENERAL] Can't use passwords for users

2007-01-18 Thread Neal Clark
Have you tried the CREATE USER command from psql/a client application? I.e. to create a user that is not a super user and can't create databases or roles: CREATE USER [name] WITH NOCREATEDB NOCREATEUSER PASSWORD '[password]'; as for your 'createuser' problem... i've got nothin On Ja

Re: [GENERAL] PostgreSQL and embedded PC with Compact Flash?

2007-01-18 Thread A.M.
On Jan 17, 2007, at 9:52 , k.novo wrote: Hello, I have strange question and idea. Use PostgreSQL in embedded PC (with Linux) as data storage for collection measure data. Problem is in limited Write cycle in Compact Flash HDD (about 100.000) My idea is collect data to temporary table in RAM

Re: [GENERAL] SELECT INTO TEMPORARY problem

2007-01-18 Thread Jaime Casanova
On 1/17/07, Tom Lane <[EMAIL PROTECTED]> wrote: David Goodenough <[EMAIL PROTECTED]> writes: > In one of the requests I do a SELECT ... INTO TEMPORARY t1 ..., which > works just fine when I first use it, but from then on it objects saying > that t1 already exists. When I read the documentation (

[GENERAL] octet string type contribution

2007-01-18 Thread Ron Peterson
I have created a fixed length octet string type which anyone so inclined should feel free to use. The purpose of this type is to reduce the overhead associated with storing fixed length binary data in a variable length type like bytea. So far, I've implemented a sixteen octet string type, which w

Re: [GENERAL] uninstalling postgre sql on Fedora core 5

2007-01-18 Thread Chris
[EMAIL PROTECTED] wrote: Hi, When I installed Fedora Core 5 Linux to my x86 Desktop machine, it automatically included PostGreSQL. What is the proper way to uninstall? Since it came by default, I can't tell if it was installed by source or RPM ... or can I? Not sure why you'd want to remove

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Michael Fuhr
On Thu, Jan 18, 2007 at 06:14:23PM -0800, Joshua D. Drake wrote: > http://www.commandprompt.com/ :) We are more cost effective and have > been doing it for much, much longer ;) As somebody with a measure of influence over PostgreSQL work in my organization, I'll say that unsolicited email to my p

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Stephen Frost
* Joshua D. Drake ([EMAIL PROTECTED]) wrote: > > > > Without that, I might have even filed it away in case I needed what they > > were offering (24/7 phone support is useful for those of us in vastly > > different time zones). > > http://www.commandprompt.com/ :) We are more cost effective and h

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Joshua D. Drake
> > Without that, I might have even filed it away in case I needed what they > were offering (24/7 phone support is useful for those of us in vastly > different time zones). http://www.commandprompt.com/ :) We are more cost effective and have been doing it for much, much longer ;) Sincerely, J

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Klint Gore
On Thu, 18 Jan 2007 17:08:53 -0800, "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > Alan Hodgson wrote: > > On Thursday 18 January 2007 16:44, Ron Johnson <[EMAIL PROTECTED]> > >> Harsh, aren't we? > >> > >> Rich and Garland weren't peddling pr0n or a pump-and-dump stock > >> scam. The fact that t

[GENERAL] Who is Slony Master/Slave + general questions.

2007-01-18 Thread sjarosz
Hello, I'm starting to use slony as a redundancy solution for the project I'm currently working on. Running SuSE Linux 9 where one machine contains the prime database and the second machine contains the backup database. The Slony version I'm using is 1.1.2. If some of the issues have been add

[GENERAL] Alter definition of a column

2007-01-18 Thread af300wsm
Hello, In this case, I don't have to alter the definition to the extent of changing the data type, but rather to change the length of a varchar field/column. I found the following from a past posting to one of the PostgreSQL user lists that does work, but I'd like something a bit more elegant and

Re: [GENERAL] Finding bogus dates

2007-01-18 Thread Adam Rich
I suppose you could create a boolean function that does a cast, and catches the execption, returning NULL. If that doesn't work, a perl stored procedure using Date::Calc and check_date() ? - Original Message From: Scott Ribe <[EMAIL PROTECTED]> To: pgsql-general postgresql.org S

Re: [GENERAL] Building web sites using a database

2007-01-18 Thread [EMAIL PROTECTED]
On Jan 17, 1:45 pm, [EMAIL PROTECTED] (Tony Caduto) wrote: > Well, you could always start with something like Drupal:http://www.drupal.com Do you mean http://drupal.org/ ? ---(end of broadcast)--- TIP 5: don't forget to increase your free space ma

[GENERAL] Defining data directory while installing [WinXP]

2007-01-18 Thread Ole Laurisch
Hello, I would like to install PGSQL on Windows XP and would like to change the default directory for the data as I would prefer to have my databases on a specific partition and not on my programm partitition. What do I have to do for it? Can you give a short describtion to a complete PGSQL noob?

Re: [GENERAL] Index bloat of 4x

2007-01-18 Thread Ed L.
On Thursday January 18 2007 6:07 am, Bill Moran wrote: > Right. It doesn't _look_ that way from the graph, but that's > because I only graph total DB size. I expect if I graphed > data and index size separately, it would be evident. pg_total_relation_size() might give you what you want there. >

[GENERAL] PostgreSQL and embedded PC with Compact Flash?

2007-01-18 Thread k . novo
Hello, I have strange question and idea. Use PostgreSQL in embedded PC (with Linux) as data storage for collection measure data. Problem is in limited Write cycle in Compact Flash HDD (about 100.000) My idea is collect data to temporary table in RAM (RAM Disk) and once day rewrite all collect

[GENERAL] uninstalling postgre sql on Fedora core 5

2007-01-18 Thread laredotornado
Hi, When I installed Fedora Core 5 Linux to my x86 Desktop machine, it automatically included PostGreSQL. What is the proper way to uninstall? Since it came by default, I can't tell if it was installed by source or RPM ... or can I? Thanks, - Dave ---(end of broadcast)

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Richard Troy
On Thu, 18 Jan 2007, Joshua D. Drake wrote: > > > > Spam is spam. I don't care what they're selling. Anyone dumb enough to > > send spam in 2006 should be fired on the spot. > > That is a bit extreme. One persons SPAM is another persons interesting > information. Although I agree that the behavi

Re: [GENERAL] Clearing plans

2007-01-18 Thread Peter Kovacs
Are the plans cached per connection? Why not globally? Thanks Peter On 1/18/07, Tom Lane <[EMAIL PROTECTED]> wrote: Scott Ribe <[EMAIL PROTECTED]> writes: > Is there a way to force a flush of all cached plans? Start a fresh connection. regards, tom lane --

[GENERAL] Can't use passwords for users

2007-01-18 Thread Stockho, Jonathan W
I'm new to postgres, so bare with me. I installed version 8.2 from rpms on Suse 10. I then changed to the postgres user and ran initdb. After that I create a database called movies using the command "createdb movies" Then I used the pg_ctl command to start the postmaster with the following c

Re: [GENERAL] Alter definition of a column

2007-01-18 Thread af300wsm
[EMAIL PROTECTED] wrote: > Hello, > > The +4 is for the overhead of a varchar field. > > Using ALTER TABLE ALTER TYPE VARCHAR() to > change the size requires scanning the entire table. For large tables, > this will be much slower than the pg_attribute query. Both will get > the job done. > Th

[GENERAL] help me to solve the problem

2007-01-18 Thread Thobiyas
Dear /Sir I am Attmepting follwoing this problem if I Create Database or retore database i am facing following this problem psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.

Re: [GENERAL] datatype advice numeric vs. varchar

2007-01-18 Thread [EMAIL PROTECTED]
On Jan 18, 1:25 am, [EMAIL PROTECTED] (Gene) wrote: > you're probably right, actually using LIKE with numeric works fine but > of course i will have to contend with things like truncating zeros to > the left etc... are there any advantages to using ascii encoding as > far as performance of LIKE, RE

[GENERAL] Installation of PostgreSQL Service under admin account

2007-01-18 Thread Vinesh, Raghavan
Hello, PostgreSQL version: 8.2.1 OS: Windows 2003 Server / Windows XP Professional When I try installation of PostgreSQL by providing an admin account for postgresql service user the installation fails. According to the release notes of PostgreSQL 8.2 this is supported. http://www.postgresql.org/

[GENERAL] how to show serial number of record

2007-01-18 Thread deepak pal
hi i want to add a coloum called serial numer in my record set how could i do it..that column is not in table.

Re: [GENERAL] postmaster disconnects after heavy load inserts from plperlu -> waht to do?

2007-01-18 Thread Christian Maier
Oh Sorry yes of corse. No Error Msg just a ":" sign and disconnectet (I use pgadmin3 for this) My develop postgres is on 8.2 on a windows machine. And thanks for the hint with the log, I found a related Bug http://archives.postgresql.org/pgsql-bugs/2006-12/msg00163.php After an update of my Inst

Re: [GENERAL] Alter definition of a column

2007-01-18 Thread [EMAIL PROTECTED]
Hello, The +4 is for the overhead of a varchar field. Using ALTER TABLE ALTER TYPE VARCHAR() to change the size requires scanning the entire table. For large tables, this will be much slower than the pg_attribute query. Both will get the job done. [EMAIL PROTECTED] wrote: > Hello, > > In thi

[GENERAL] find columns that contain a single value for all rows

2007-01-18 Thread gkl12799
Hi, Is there an easy way to find all the columns in all the tables in a database which contain the same value for all rows? For example, Column A contains the value '365' for all of the rows in Table One: Col A 365 365 365 365 365 ... ... ... I need a recursive f

Re: [GENERAL] Coercion in PGSQL?

2007-01-18 Thread Filip RembiaƂkowski
2007/1/16, Max Ueda <[EMAIL PROTECTED]>: Hi, I've been wondering with some wrong results that are being returned from some functions in my application. Basically, they are algebraic functions dealing with int values. Some results made me think of coercion between int types. For example, atribut

[GENERAL] trigger question

2007-01-18 Thread Furesz Peter
Hello, I have a table named foobar and I don't want to allow from DELETE or UPDATE its rows. I have a table as described below: foobar(foobar_id, value, is_deleted); I don't want to allow directly delete or modify the table's rows. I plan to make an on before update or delete trigger and on

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Gregory S. Williamson
In 2007 however, the punishment ought to be ... ?? ;-) Greg Williamson DBA GlobeXplorer LLC, a DigitalGlobe Company Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information an

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Joshua D. Drake
Alan Hodgson wrote: > On Thursday 18 January 2007 16:44, Ron Johnson <[EMAIL PROTECTED]> >> Harsh, aren't we? >> >> Rich and Garland weren't peddling pr0n or a pump-and-dump stock >> scam. The fact that they've lost some (a lot of?) respect from >> potential customers will be pain enough. >> > >

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Jaime Casanova
On 1/18/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: Gregory S. Williamson wrote: > I got one as well ... not a big deal in my mind since it's only happened once (weekly would be offensive), and it's not entirely out of the realm of possibility that we'd have use for their services (I try to

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Jaime Casanova
On 1/18/07, Alan Hodgson <[EMAIL PROTECTED]> wrote: On Thursday 18 January 2007 15:54, Steve Atkins <[EMAIL PROTECTED]> wrote: > Anyone else get spam from EnterpriseDB today, talking about > "Postgresql Support Services"? > yep. You really would think that even the marketing weenies might know

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Alan Hodgson
On Thursday 18 January 2007 16:44, Ron Johnson <[EMAIL PROTECTED]> > Harsh, aren't we? > > Rich and Garland weren't peddling pr0n or a pump-and-dump stock > scam. The fact that they've lost some (a lot of?) respect from > potential customers will be pain enough. > Spam is spam. I don't care wha

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/18/07 18:29, Alan Hodgson wrote: > On Thursday 18 January 2007 15:54, Steve Atkins <[EMAIL PROTECTED]> wrote: >> Anyone else get spam from EnterpriseDB today, talking about >> "Postgresql Support Services"? >> > > yep. You really would think th

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Alan Hodgson
On Thursday 18 January 2007 15:54, Steve Atkins <[EMAIL PROTECTED]> wrote: > Anyone else get spam from EnterpriseDB today, talking about > "Postgresql Support Services"? > yep. You really would think that even the marketing weenies might know better by now. Hopefully whoever is responsible is c

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Joshua D. Drake
Gregory S. Williamson wrote: > I got one as well ... not a big deal in my mind since it's only happened once > (weekly would be offensive), and it's not entirely out of the realm of > possibility that we'd have use for their services (I try to keep an update > list of possible resources for my e

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Gregory S. Williamson
I got one as well ... not a big deal in my mind since it's only happened once (weekly would be offensive), and it's not entirely out of the realm of possibility that we'd have use for their services (I try to keep an update list of possible resources for my employers in the event that I get hit

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Jorge Godoy
"Jaime Casanova" <[EMAIL PROTECTED]> writes: > On 1/18/07, Steve Atkins <[EMAIL PROTECTED]> wrote: >> Anyone else get spam from EnterpriseDB today, talking about >> "Postgresql Support Services"? >> > > yes... Same here... Already reported their spam to spamcop... It is nice that I got 3 messag

Re: PG not rejecting bad dates (was Re: [GENERAL] Finding bogus dates)

2007-01-18 Thread David Fetter
On Thu, Jan 18, 2007 at 06:05:37PM -0600, Ron Johnson wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 01/18/07 17:52, David Fetter wrote: > > On Thu, Jan 18, 2007 at 05:42:54PM -0600, Ron Johnson wrote: > >> > >> On 01/18/07 17:22, Scott Ribe wrote: > But this won't work if on

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Clodoaldo
2007/1/18, Steve Atkins <[EMAIL PROTECTED]>: Anyone else get spam from EnterpriseDB today, talking about "Postgresql Support Services"? I got one to an email address most likely harvested from one of the Postgresql mailing lists. Ingrid Catlin over at EnterpriseDB confirmed that they sent the ma

Re: PG not rejecting bad dates (was Re: [GENERAL] Finding bogus dates)

2007-01-18 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/18/07 17:52, David Fetter wrote: > On Thu, Jan 18, 2007 at 05:42:54PM -0600, Ron Johnson wrote: >> >> On 01/18/07 17:22, Scott Ribe wrote: But this won't work if one had a text column of dates in various formats, right? >>> Right. In my

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Jaime Casanova
On 1/18/07, Steve Atkins <[EMAIL PROTECTED]> wrote: Anyone else get spam from EnterpriseDB today, talking about "Postgresql Support Services"? yes... -- regards, Jaime Casanova "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs an

Re: PG not rejecting bad dates (was Re: [GENERAL] Finding bogus dates)

2007-01-18 Thread Chad Wagner
On 1/18/07, Ron Johnson <[EMAIL PROTECTED]> wrote: > Right. In my case I have bad data from a source I didn't control, exported > via code that I do control which happens to output -MM-DD. Well, except > that I don't do what I need to when MM or DD are more than 2 digits, but I'm > going bac

[GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Steve Atkins
Anyone else get spam from EnterpriseDB today, talking about "Postgresql Support Services"? I got one to an email address most likely harvested from one of the Postgresql mailing lists. Ingrid Catlin over at EnterpriseDB confirmed that they sent the mail, but that Rich Romanik provided the

Re: [GENERAL] drive failre, corrupt data...

2007-01-18 Thread Jeff Amiel
Tom Lane wrote: Yech. So much for RAID reliability ... maybe you need to reconfigure the array for more redundancy? Yeah...I'm not sure if I screwed the pooch by trying the bring the drive back 'online'.in the past we just try re-seating it and the raid card 'does its thing' and rebui

Re: PG not rejecting bad dates (was Re: [GENERAL] Finding bogus dates)

2007-01-18 Thread David Fetter
On Thu, Jan 18, 2007 at 05:42:54PM -0600, Ron Johnson wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 01/18/07 17:22, Scott Ribe wrote: > >> But this won't work if one had a text column of dates in various > >> formats, right? > > > > Right. In my case I have bad data from a sourc

Re: [GENERAL] drive failre, corrupt data...

2007-01-18 Thread Tom Lane
Jeff Amiel <[EMAIL PROTECTED]> writes: > ran fsck > PARTIALLY TRUNCATED INODE I=612353 > SALVAGE? yes > INCORRECT BLOCK COUNT I=612353 (544 should be 416) > CORRECT? yes > [EMAIL PROTECTED] find /db -inum 612353 > /db/pg_clog/0952 Yech. So much for RAID reliability ... maybe you need to reconf

PG not rejecting bad dates (was Re: [GENERAL] Finding bogus dates)

2007-01-18 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/18/07 17:22, Scott Ribe wrote: >> But this won't work if one had a text column of dates in various >> formats, right? > > Right. In my case I have bad data from a source I didn't control, exported > via code that I do control which happens to ou

Re: [GENERAL] Finding bogus dates

2007-01-18 Thread Scott Ribe
> But this won't work if one had a text column of dates in various > formats, right? Right. In my case I have bad data from a source I didn't control, exported via code that I do control which happens to output -MM-DD. Well, except that I don't do what I need to when MM or DD are more than 2 d

Re: [GENERAL] Dynamic loading of Perl Code in Postgres functions

2007-01-18 Thread Harpreet Dhaliwal
Don't think it would work the way you are doing it. This way it would only work if you dealing with shared objects in C where in you dynamically load the shared object and then call a specific function of that shared object. Lately i tried the following for you but it doesn't execute the Insert s

Re: [GENERAL] drive failre, corrupt data...

2007-01-18 Thread Matthew Peter
Wow. I just noticed I have the same problem today after a vacuum. As well as an degraded array. Musta been a time release Y2k7 bug. Hopefully didn't loose anything too important. Now that's room service! Choo

Re: [GENERAL] Dynamic loading of Perl Code in Postgres functions

2007-01-18 Thread Jasbinder Singh Bali
Lately i've been able to user 'require' command successfully and the script was pretty straight forward and simple. I had to play around with @INC. Moving forward, I have another question here, CREATE FUNCTION *funcname* (*argument-types*) RETURNS *return-type* AS require " abc.pl" $$ LANGUAG

Re: [GENERAL] Finding bogus dates

2007-01-18 Thread John D. Burger
Scott Ribe wrote: Actually, that's the core of the direct query! select * from foo where to_date(olddate,'-MM-DD')::text <> olddate; The format of the exported dates matches the default date::text format because I specified the export that way. If not, the query would be a little more

[GENERAL] DB benchmark and pg config file help

2007-01-18 Thread Kevin Hunter
[Note: This is a repost of a message to the performance list yesterday. I'm not sure if it didn't go through, or if no one had any suggestions. In any event, I'll try here. :) ] Hello List, Not sure to which list I should post (gray lines, and all that), so point me in the right direction i

Re: [GENERAL] apt-get install postgresql.deb??

2007-01-18 Thread Devrim GUNDUZ
Hi, On Thu, 2007-01-18 at 14:17 -0700, [EMAIL PROTECTED] wrote: > how to get postgresql 8* debian package?? 8.0 and 8.1 are in Debian repos. If you are looking for 8.2.1, visit here: http://packages.qa.debian.org/p/postgresql-8.2.html Regards, -- The PostgreSQL Company - Command Prompt, Inc.

[GENERAL] apt-get install postgresql.deb??

2007-01-18 Thread volunteer
hello how to get postgresql 8* debian package?? nto at http://www.debian.org/distrib/packages http://www.postgresql.org/ftp/binary/v8.2.1/linux/?? many thank yous sincerely siva ---(end of broadcast)--- TIP 9: In versions below 8.0, the planne

Re: [GENERAL] Finding bogus dates

2007-01-18 Thread Scott Ribe
> Bad dates like 02/31/2006 will be converted to sane dates. Actually, that's the core of the direct query! select * from foo where to_date(olddate,'-MM-DD')::text <> olddate; The format of the exported dates matches the default date::text format because I specified the export that way. If n

Re: [GENERAL] Finding bogus dates

2007-01-18 Thread Brandon Aiken
Actually, now that I think about it a second you can find them really easy just by doing: SELECT * FROM "foo" WHERE to_char(to_date("oldDate",'MM/DD/'),'MM/DD/') <> "oldDate"; -- Brandon Aiken CS/IT Systems Engineer -Original Message- From: Scott Ribe [mailto:[EMAIL PROTECTED]

Re: [GENERAL] Finding bogus dates

2007-01-18 Thread Scott Ribe
I didn't know to_date would do that. It's better anyway. I just continued with the "fix and try again" approach and they're only 2 bad dates out 94,000+, so I don't have a huge problem here. I can try to do some research and find the correct date, but failing that, the to_date approximation is prob

Re: [GENERAL] Finding bogus dates

2007-01-18 Thread Brandon Aiken
Add a date field to the table. Run UPDATE "foo" SET "newDate" = to_date("oldDate","MM/DD/"). Bad dates like 02/31/2006 will be converted to sane dates. 02/31/2006 --> 03/03/2006. Now run SELECT * FROM "foo" WHERE to_char("newDate","MM/DD/") <> "oldDate". If a date got changed for sanit

Re: [GENERAL] Finding bogus dates

2007-01-18 Thread A. Kretschmer
am Thu, dem 18.01.2007, um 11:26:03 -0700 mailte Scott Ribe folgendes: > Suppose that I have a varchar column which contains dates, and some of them > are bogus, such as '1968-02-31'. Is it possible to specify a query condition > "cannot be cast to a valid date". (It's legacy data, and I'm trying

Re: [GENERAL] drive failre, corrupt data...

2007-01-18 Thread Jeff Amiel
raid rebuilt... ran fsck PARTIALLY TRUNCATED INODE I=612353 SALVAGE? yes INCORRECT BLOCK COUNT I=612353 (544 should be 416) CORRECT? yes PARTIALLY TRUNCATED INODE I=612389 SALVAGE? yes INCORRECT BLOCK COUNT I=612389 (544 should be 416) CORRECT? yes INCORRECT BLOCK COUNT I=730298 (676448 should

Re: [GENERAL] Finding bogus dates

2007-01-18 Thread Scott Ribe
> I suppose you could create a boolean function that does a cast, and catches > the > execption, returning NULL. Yes, I was puzzling over query syntax and didn't think about a function. That would be fine. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice

Re: [GENERAL] Clearing plans

2007-01-18 Thread Scott Ribe
> Start a fresh connection. OK. Better than having to restart the whole server, which is what I was doing... -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ---(end of broadcast)--- TIP 6: explain analyze is your

Re: [GENERAL] Finding bogus dates

2007-01-18 Thread Tomas Vondra
> Suppose that I have a varchar column which contains dates, and some of them > are bogus, such as '1968-02-31'. Is it possible to specify a query condition > "cannot be cast to a valid date". (It's legacy data, and I'm trying to clean > it up before importing into the final schema.) There probably

[GENERAL] pg_passwd alternative in Postgres 8.1.5

2007-01-18 Thread Arindam
Hi, I work on an application which distributes postgres with itself and automates its installation. As part of the installation script, we carry out something similar to this: /opt/postgres/pgsql/server/bin/pg_passwd /opt/postgresql/pgsql/pgsql/data/passwd < /tmp/.pg_passwd_input Obviously, thi

Re: [GENERAL] GUID/UUID Support

2007-01-18 Thread Jeremy Haile
> Yeah, but it's not going to be added to core until there's some > agreement about *what* needs to be added. The point of the external > project is that once it has acheived a level of support *then* it can > be incorporated. That's fair. In truth, I only found that pguuid existed fairly recentl

Re: [GENERAL] GUID/UUID Support

2007-01-18 Thread Martijn van Oosterhout
On Thu, Jan 18, 2007 at 01:09:15PM -0500, Jeremy Haile wrote: > I second the desire for a UUID type in PostgreSQL! I'm aware of the > pguuid project, but it's not the same as having it in core and isn't > very well maintained. Yeah, but it's not going to be added to core until there's some agre

Re: [GENERAL] Clearing plans

2007-01-18 Thread Tom Lane
Scott Ribe <[EMAIL PROTECTED]> writes: > Is there a way to force a flush of all cached plans? Start a fresh connection. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] Finding bogus dates

2007-01-18 Thread Scott Ribe
Suppose that I have a varchar column which contains dates, and some of them are bogus, such as '1968-02-31'. Is it possible to specify a query condition "cannot be cast to a valid date". (It's legacy data, and I'm trying to clean it up before importing into the final schema.) There probably aren't

Re: [GENERAL] GUID/UUID Support

2007-01-18 Thread Jeremy Haile
I second the desire for a UUID type in PostgreSQL! I'm aware of the pguuid project, but it's not the same as having it in core and isn't very well maintained. This is such a common database paradigm that it seems reasonable to promote it to first-class citizen status in PostgreSQL. I currently

[GENERAL] Clearing plans

2007-01-18 Thread Scott Ribe
Is there a way to force a flush of all cached plans? Particularly, to force re-evaluation of immutable stored procedures? Don't worry, it's a testing & development thing, not something I want to do during production ;-) -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 v

Re: [GENERAL] GUID/UUID Support

2007-01-18 Thread Patrick Earl
One issue is that UUIDs are only 16 bytes of data. To store the as text in canonical form requires 36 bytes. As there are alternate frequently used representations, you also run into potential issues with input. The GUID type (proposed by Gevik) handles those standard input variations. Though

Re: [GENERAL] Corrupt database? 8.1/FreeBSD6.0

2007-01-18 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> But it seems that we need a band-aid for 8.1 and earlier. The simplest >> fix I can think of is for vacuum not to attempt to advance the >> datvacuumxid/datfrozenxid fields if it skipped over any temp tables of >> other backends. Tha

Re: [GENERAL] [1/2 OFF] Varlena.com inaccessible from .br (Blocked?)

2007-01-18 Thread Jorge Godoy
"Alejandro D. Burne" <[EMAIL PROTECTED]> writes: > Me too, from Argentina, may be don't like south america? It looks to me like one of those stupid and indiscriminated blocks on 200/8 and 201/8 networks... :-( Anyway, I believe that now it is more than clear that there's nothing on my networks

Re: [GENERAL] Corrupt database? 8.1/FreeBSD6.0

2007-01-18 Thread Alvaro Herrera
Tom Lane wrote: > I wrote: > > ... but I suddenly fear that we've missed a fundamental point about > > pg_clog truncation. And WAL wraparound for that matter. To wit, a > > sufficiently long-lived temp table could contain old XIDs, and there's > > no way for anyone except the owning backend to cl

Re: [GENERAL] [1/2 OFF] Varlena.com inaccessible from .br (Blocked?)

2007-01-18 Thread Alejandro D. Burne
2007/1/18, Alvaro Herrera <[EMAIL PROTECTED]>: Ian Harding wrote: > Brazil has been trying to get its ISPs to block access to a certain > video. I wonder if too wide a net was cast in that effort. > > http://www.slate.com/id/2157399/?nav=navoa FWIW, I'm also blocked out of varlena.com and I'm

Re: [GENERAL] Ask about large database?

2007-01-18 Thread Scott Marlowe
On Thu, 2007-01-18 at 02:03, Thuy Nguyen wrote: > Hi Sir/Madam! > I am look for RDBMS solution for my web application, size of my > database may be about 10GB-->500GB. How PostgreSQL work well or how > must I config it? > My application process data locally; one database has only one > connection

Re: [GENERAL] How I can read-back a serial value just inserted?

2007-01-18 Thread Devrim GUNDUZ
Hi, On Thu, 2007-01-18 at 10:01 -0600, Russ Brown wrote: > lastval's main benefit is in aiding the port of MySQL apps (being a > drop-in replacement for LAST_INSERT_ID()). without lastval such ports > can be really difficult. I think one can also use INSERT/UPDATE...RETURNING that appeared in

Re: [GENERAL] How I can read-back a serial value just inserted?

2007-01-18 Thread Russ Brown
Robert Treat wrote: On Thursday 18 January 2007 00:57, Adam Rich wrote: If it's a recent PG: select lastval() See this: http://www.postgresql.org/docs/8.2/interactive/functions-sequence.html probably more important that you see this: http://people.planetpostgresql.org/xzilla/index.php?/arc

Re: [GENERAL] How I can read-back a serial value just inserted?

2007-01-18 Thread Robert Treat
On Thursday 18 January 2007 00:57, Adam Rich wrote: > If it's a recent PG: > > select lastval() > > See this: > > http://www.postgresql.org/docs/8.2/interactive/functions-sequence.html > probably more important that you see this: http://people.planetpostgresql.org/xzilla/index.php?/archives/169-Is

Re: [GENERAL] [1/2 OFF] Varlena.com inaccessible from .br (Blocked?)

2007-01-18 Thread Alvaro Herrera
Ian Harding wrote: > Brazil has been trying to get its ISPs to block access to a certain > video. I wonder if too wide a net was cast in that effort. > > http://www.slate.com/id/2157399/?nav=navoa FWIW, I'm also blocked out of varlena.com and I'm not in Brazil, but in Chile. -- Alvaro Herrera

[GENERAL] drive failre, corrupt data...

2007-01-18 Thread Jeff Amiel
Had a drive failure on a raid 5 array of a backup box that a couple of postgres databases sit on. One of the databases is a slony subscriber to a production database and the other is a test-environment database. The drive was offline...brought it back online, hoping it would start a rebuild.

Re: [GENERAL] datatype advice numeric vs. varchar

2007-01-18 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/18/07 00:22, Michael Glaesemann wrote: > > On Jan 18, 2007, at 15:15 , Gene wrote: > >> My calculations for disk space based off some information i found >> online are ( 8 + ( 2 bytes for every four digits) ) for numeric and ( >> 4 + number of

Re: [GENERAL] Index bloat of 4x

2007-01-18 Thread Bill Moran
In response to Tom Lane <[EMAIL PROTECTED]>: > Bill Moran <[EMAIL PROTECTED]> writes: > > It wasn't the fact that it bloated that surprised me. It was the > > _magnitude_ of bloat that I wasn't expecting, as well as the fact that > > it was _all_ _index_ bloat. > > Um, no, you had plenty of tabl

Re: [GENERAL] Controlling memory of session

2007-01-18 Thread Martijn van Oosterhout
On Thu, Jan 18, 2007 at 11:52:12AM +0100, Magnus Hagander wrote: > > Not knowing how much RAM can take the server is annoying. You have to be > > extra careful and scale the server down as you don't know what will happen. > > The fact that work_mem is "per sort" and not "per backend" is going to >

Re: [GENERAL] Get SQL dump from readonly FS

2007-01-18 Thread Frank Wittig
Hi Hannes, what type of snapshot are you referring to? If you use LVM2, you can create writeable snapshots. You simply have to spend some free space of your volume group (as much as the expeted amount of data to be written). Writes to that snapshot are deleted along with deletion of the snapshot.

Re: [GENERAL] [1/2 OFF] Varlena.com inaccessible from .br (Blocked?)

2007-01-18 Thread Jorge Godoy
"Ian Harding" <[EMAIL PROTECTED]> writes: > Brazil has been trying to get its ISPs to block access to a certain > video. I wonder if too wide a net was cast in that effort. > > http://www.slate.com/id/2157399/?nav=navoa The problem is prior to that stupidity. The block to the Cicarelli video wa

Re: [GENERAL] Controlling memory of session

2007-01-18 Thread Magnus Hagander
On Thu, Jan 18, 2007 at 07:41:27AM +, James Im wrote: > Ok so the solution is to limit the number of connections. But it seems > that there is no good way to choose the ideal number of connections as I > don't know how much RAM will a connection use. > > If a connection takes 3MB (on windows I

Re: [GENERAL] Ask about large database?

2007-01-18 Thread Hannes Dorbath
On 18.01.2007 09:03, Thuy Nguyen wrote: I am look for RDBMS solution for my web application, size of my database may be about 10GB-->500GB. How PostgreSQL work well or how must I config it? My application process data locally; one database has only one connection (not a server-client model).

[GENERAL] Get SQL dump from readonly FS

2007-01-18 Thread Hannes Dorbath
Is there any way for PostgreSQL to start up on a read only file system for the sole purpose of creating a dump? Background is that I like to create a SQL dump from file system snapshot. I guess the answer is a plain "No." ;) Thanks. -- Regards, Hannes Dorbath ---(en

[GENERAL] Ask about large database?

2007-01-18 Thread Thuy Nguyen
Hi Sir/Madam! I am look for RDBMS solution for my web application, size of my database may be about 10GB-->500GB. How PostgreSQL work well or how must I config it? My application process data locally; one database has only one connection (not a server-client model). Please tell me your sug