Re: [GENERAL] Select question..... is there a way to do this?

2007-08-04 Thread Rodrigo De León
On Aug 3, 11:17 pm, [EMAIL PROTECTED] (Karl Denninger) wrote: Ideas? SELECT item.user, item.subject, item.number FROM item, seen WHERE item.user = seen.user AND item.number = seen.number AND item.changed seen.lastviewed UNION SELECT item.user, item.subject, item.number FROM item,

[GENERAL] Safe usage of tsearch2: to_tsquery('user input')

2007-08-04 Thread cluster
In a web application I would like to use tsearch2 to search for by-user entered key words. That is, the user provides the keywords in a space separated list in some input text field. For that I use to_tsquery('user keywords') but I would like to do this in a safe way so that the user cannot

Re: [GENERAL] PG Admin

2007-08-04 Thread Andrei Kovalevski
Bob Pawley wrote: Can anyone tell me why a table developed through the PG Admin interface isn't found by SQL when accessing it through the SQL interface?? Bob Pawley 1) Are you sure you are connecting to the same database? 2) What kind of SQL interface you are using? Andrei.

Re: [GENERAL] Core reported from vaccum function.

2007-08-04 Thread Mavinakuli, Prasanna (STSD)
Fine.Thanks for all your suggestions and time. Thanks a lot, Prasanna. -Original Message- From: Alvaro Herrera [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 01, 2007 8:48 AM To: Mavinakuli, Prasanna (STSD) Cc: pgsql-general@postgresql.org; Tom Lane; Rao, Srikanth R (STSD);

Re: [GENERAL] Require entry of MD5 hash instead of plaintext password?

2007-08-04 Thread mwsenecal
On Jul 28, 12:32 pm, [EMAIL PROTECTED] (Michael Fuhr) wrote: On Fri, Jul 27, 2007 at 09:33:37AM -0700, [EMAIL PROTECTED] wrote: Is there a way to configure PostgreSQL 8.0 so that when prompted for a password, the user enters the MD5 hash of his password, instead of the normal plaintext

[GENERAL] pg_restore UTF8 problem

2007-08-04 Thread Thomas Burns
Hi, I ran into a problem while restore a database. I am converting a database from SQLASCII to UTF8. The pg_restore fails with: pg_restore: ERROR: invalid UTF-8 byte sequence detected near byte 0xe7 CONTEXT: COPY sl_email_messages, line 119593, column message: In Reply To:get a life

Re: [GENERAL] Question about Postgres

2007-08-04 Thread Paul Linehan
NetComrade wrote: I apologize for cross-posting, but I need some help w/o too many advices RTFM :). After Oracle and MySQL, this becomes the third product that I need to learn to some degree, and I need a few links which would provide a 'quick tutorial' especially for folks with Oracle

[GENERAL] HA, failover and load balancing / howto?

2007-08-04 Thread hanasaki
I have some web applications and rich clients that need to geographically localized copies (for network latency reasons) of a database (East Coast, Central, West Coast and Japan) These will be mostly read however there will be full CRUD activities going on. I think this means that there will be

[GENERAL] could not [extend relation|write block N of temporary file|write to hash-join temporary file]

2007-08-04 Thread Alessandra Bilardi
Hi everyone, I use PostgreSQL 8.1.9 and Debian 4.0 etch Linux kernel 2.6.18 (debian precompiled). I install my db and insert one test database without problems. I create schema of this db as sql script. Sql script is a list about create relation table test_table.TEMP__N and set relation and drop

[GENERAL] date ranges

2007-08-04 Thread jo
Hello, I would like to know if there's a simple way to customize the range for dates, to avoid people insert dates before 1900 and after 2020, for example. Thank you for your time, jo ---(end of broadcast)--- TIP 9: In versions below 8.0, the

Re: [GENERAL] Core reported from vaccum function.

2007-08-04 Thread Mavinakuli, Prasanna (STSD)
Hello Alvaro, Thanks Alvaro for your time and suggestions.Yes we do understand that we are expected to use the higher versions.But as Bruce pointed out already,the same is NOT recommended when there is NO imperative reason.Hence we were just in the process of validating and justifying the

[GENERAL] backend process terminates

2007-08-04 Thread Geoffrey Myers
We've been wrestling with a problem where the backend process terminates with a SEGSEGV. We are having a hard time tracking this thing down, so I decided to run a batch gdb process that single steps through the code until it crashes and post the output to the list for a request for

Re: [GENERAL] Restrict access

2007-08-04 Thread Michael Knudsen
On Aug 2, 4:08 pm, Michael Knudsen [EMAIL PROTECTED] wrote: I can't find a file with that name. I am not using postgreSQL on my own computer, so the file may be hidden somewhere in a directory which I haven't got access to. Is there another way to get rid of 'trust'? Finally, I have managed

Re: [GENERAL] Porting MySQL data types to PostgreSQL

2007-08-04 Thread Patrick TJ McPhee
In article [EMAIL PROTECTED], Tom Lane [EMAIL PROTECTED] wrote: % [EMAIL PROTECTED] (Patrick TJ McPhee) writes: % One problem with this idea is the treatment of implicit casts between % numeric types in TypeCategory(). For implicit casts to work, the type's % OID has to be listed in that

[GENERAL] timezone + DST handling

2007-08-04 Thread A.M.
Hi, I have a CMS where I display the timezone for international meeting dates. I store the dates as follows: startdate | timestamp with timezone timezonename | text This works fine until I hit daylight-savings time when the name of the timezone changes. So, given a timestamp with timezone

[GENERAL] List tables in reverse dependancy order

2007-08-04 Thread Gregory Williamson
I am not sure if this is the appropriate list -- please point me at the correct one if not. I'm trying to create a procedure that would let me retrieve a list of tables and views in a database that will be used to control the order in which lookup data is created/loaded. So, much simplified,

Re: [GENERAL] Restrict access

2007-08-04 Thread Michael Knudsen
On Aug 2, 3:51 pm, Adam Witney [EMAIL PROTECTED] wrote: Take a look at the pg_hba.conf in the PGDATA directory, you probably have the connection set to 'trust'... Which won't require a password from that connection location/type. You will need to run a pg_ctl reload to make any changes take

Re: [GENERAL] Core reported from vaccum function.

2007-08-04 Thread Mavinakuli, Prasanna (STSD)
Hello Tom and Alvaro, Yes.Sorry for the mistake done because of the wrong interpretation.Now we have the message.We will go ahead with the upgrade. Thanks a lot, Prasanna. -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 01, 2007 8:51 AM To:

Re: [GENERAL] query to match '\N'

2007-08-04 Thread Lew
pc wrote: oh yes! You all are exactly right.I exported a table and all nulls became \N and when i imported it \n remained \N and did not convert to NULL.So I updates all \N s with '' now. Thank you all for your input.I got to learn a lot from you. Since the empty string is different from

[GENERAL] pg_shdepend big

2007-08-04 Thread Andrus
Cluster contains only single user database. Database size is 355 MB All database objects are owned by single role. I selected bigger tables from database and found that pg_shdepend is big: First number is table size, second number is table size with index files. pg_shdepend

Re: [GENERAL] What do people like to monitor (or in other words, what might be nice in pgsnmpd)?

2007-08-04 Thread Gavin M. Roy
Are you contemplating providing access to data that's currently not stored in the pg_ catalog tables? I currently monitor the statio data, transactions per second, and active/idle backends. Things that I think would be useful would be average query execution time, longest execution time, etc.

[GENERAL] python api to backup/restore data

2007-08-04 Thread Acm
I am working with Postgresql 8.2.4 and Python 2.5. I would like to know whether an API for accessing Postgresql from Python exists and whether or not it supports commands for backing up a database (or schema) and restoring a backup file. I heard about psycopg and psycopg2 but have no idea of how

[GENERAL] Help to solve configure error

2007-08-04 Thread Rajaram J
Hi It would be great if anybody could help with suggestions that could solve my problem. I have a HP-UX server and have downloaded the code for postgresql to compile and use the libraries. When I try to run the configure file I get the below message and ending with a error. I have

[GENERAL] ORDER BY on multiple columns still requires multi-col index?

2007-08-04 Thread pritchard . adam
Does this change... --- Allow index scans to use an intermediate in-memory bitmap (Tom) In previous releases, only a single index could be used to do lookups on a table. With this feature, if a query has WHERE tab.col1 = 4 and tab.col2 = 9, and there is no multicolumn index on col1 and col2,

[GENERAL] Restrict access

2007-08-04 Thread Michael Knudsen
Hi, I have created a database and imported a lot of data. I would like to share this database with other people but they should not be able to change anything. That is, they should only be allowed to use the SELECT command. If I create a user, this user can access the database and see the names

Re: [GENERAL] date ranges

2007-08-04 Thread Raymond O'Donnell
On 31/07/2007 17:26, jo wrote: I would like to know if there's a simple way to customize the range for dates, to avoid people insert dates before 1900 and after 2020, for example. How about a check constraint on the date column? Something like - create table the_table ( the_date date,

Re: [GENERAL] date ranges

2007-08-04 Thread brian
jo wrote: Hello, I would like to know if there's a simple way to customize the range for dates, to avoid people insert dates before 1900 and after 2020, for example. test=# CREATE TABLE foo ( id SERIAL PRIMARY KEY, dt DATE, CHECK ( EXTRACT('year' FROM dt) = 1900 AND

Re: [GENERAL] date ranges

2007-08-04 Thread Michael Glaesemann
On Jul 31, 2007, at 11:26 , jo wrote: I would like to know if there's a simple way to customize the range for dates, to avoid people insert dates before 1900 and after 2020, for example. You can use a check constraint on the date column, e.g., CREATE TABLE dates ( a_date date PRIMARY

Re: [GENERAL] Suse RPM's

2007-08-04 Thread Peter Eisentraut
Jorge Godoy wrote: Having updated packages would be great! Specially if they would be updated for, e.g., OpenSuSE 10.1 and OpenSuSE 10.2 (both already released) and not just for OpenSuSE 10.3 (still under development). You could probably take the existing 8.2.0 package, replace the tarball

Re: [GENERAL] Latin1 to UTF-8 ?

2007-08-04 Thread Peter Eisentraut
Aarni Ruuhimäki wrote: So, what would be the proper way to convert the dumps to UTF-8 ? Or any other solution ? Any other tool to work with the problem files ? Dump them again but set your client encoding to UTF8. -- Peter Eisentraut http://developer.postgresql.org/~petere/

Re: [GENERAL] Restrict access

2007-08-04 Thread Peter Eisentraut
Michael Knudsen wrote: I can't find a file with that name. I am not using postgreSQL on my own computer, so the file may be hidden somewhere in a directory which I haven't got access to. Is there another way to get rid of 'trust'? No. -- Peter Eisentraut

Re: [GENERAL] pg_restore UTF8 problem

2007-08-04 Thread Peter Eisentraut
Thomas Burns wrote: I ran into a problem while restore a database. I am converting a database from SQLASCII to UTF8. The pg_restore fails with: pg_restore: ERROR: invalid UTF-8 byte sequence detected near byte 0xe7 CONTEXT: COPY sl_email_messages, line 119593, column message: In Reply

Re: [GENERAL] Safe usage of tsearch2: to_tsquery('user input')

2007-08-04 Thread Tom Lane
cluster [EMAIL PROTECTED] writes: In a web application I would like to use tsearch2 to search for by-user entered key words. That is, the user provides the keywords in a space separated list in some input text field. For that I use to_tsquery('user keywords') but I would like to do this in

Re: [GENERAL] could not [extend relation|write block N of temporary file|write to hash-join temporary file]

2007-08-04 Thread Tom Lane
Alessandra Bilardi [EMAIL PROTECTED] writes: ERROR: could not write to hash-join temporary file: No space left on device Check your queries. I suspect you've written an incorrectly constrained join that is producing many more rows than you expect. regards, tom lane

Re: [GENERAL] List tables in reverse dependancy order

2007-08-04 Thread Tom Lane
Gregory Williamson [EMAIL PROTECTED] writes: I'm trying to create a procedure that would let me retrieve a list of = tables and views in a database that will be used to control the order in = which lookup data is created/loaded. So, much simplified, if table = references table B, which in turn

Re: [GENERAL] pg_shdepend big

2007-08-04 Thread Tom Lane
Andrus [EMAIL PROTECTED] writes: Is it normal that pg_shdepend is so big ? This was just discussed: http://archives.postgresql.org/pgsql-general/2007-08/msg00121.php regards, tom lane ---(end of broadcast)--- TIP 5: don't

Re: [GENERAL] python api to backup/restore data

2007-08-04 Thread Tom Lane
Acm [EMAIL PROTECTED] writes: I would like to know whether an API for accessing Postgresql from Python exists and whether or not it supports commands for backing up a database (or schema) and restoring a backup file. Run pg_dump or pg_restore as a subprocess. regards,

Re: [GENERAL] timezone + DST handling

2007-08-04 Thread Tom Lane
A.M. [EMAIL PROTECTED] writes: This works fine until I hit daylight-savings time when the name of the timezone changes. So, given a timestamp with timezone and a base timezone (non-DST), how can I determine if the date is currently in DST? Is it possible to get the name of the new DST

Re: [GENERAL] Porting MySQL data types to PostgreSQL

2007-08-04 Thread Decibel!
On Wed, Aug 01, 2007 at 05:19:33AM -, Patrick TJ McPhee wrote: In article [EMAIL PROTECTED], Tom Lane [EMAIL PROTECTED] wrote: % [EMAIL PROTECTED] (Patrick TJ McPhee) writes: % One problem with this idea is the treatment of implicit casts between % numeric types in TypeCategory(). For

Re: [GENERAL] plperl syntax highlighting for vi

2007-08-04 Thread Decibel!
On Tue, Jul 31, 2007 at 02:59:41PM -0700, Richard Broersma Jr wrote: http://www.gunduz.org/postgresql/pgsql.vim That's great for PL/PgSQL. Maybe there's a way to do it for PL/Perl, too :) Can anyone point me to a link that shows which file vim conf file need to be configured and

Re: [GENERAL] Linux distro

2007-08-04 Thread Decibel!
On Wed, Aug 01, 2007 at 08:22:24AM -0400, Kenneth Downs wrote: Ubuntu: What Windows wants to be, what the Mac is w/o the and with more control. I just replaced a hard drive in a dell machine. A ... Great graphics, great package management. However, it is still Linux and you still

Re: [GENERAL] Triggers: Detecting if a column value is explicitly set in an UPD ATE statement or not... (IS NULL not working?)

2007-08-04 Thread Decibel!
On Wed, Aug 01, 2007 at 09:30:25AM -0500, Weber, Geoffrey M. wrote: I want to set a BOOLEAN column value to FALSE by default for all INSERT and UPDATE statements performed against a particular table _UNLESS_ it's explicitly set to TRUE in the SQL statement. Here is the trigger I created: The

Re: [GENERAL] file-system snapshot under freebsd for backup

2007-08-04 Thread Decibel!
On Thu, Aug 02, 2007 at 09:49:42PM +0800, ProAce wrote: The size of my db is more then 50GB , so I consider that the pg_dump is not a good backup tool for me. And, sometimes, I need query data which is some days ago ( between 1 ~ 14 days ). If I want to transfer my db to different PG

Re: [GENERAL] python api to backup/restore data

2007-08-04 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/04/07 10:58, Tom Lane wrote: Acm [EMAIL PROTECTED] writes: I would like to know whether an API for accessing Postgresql from Python exists and whether or not it supports commands for backing up a database (or schema) and restoring a backup

[GENERAL] v8.2 ... command line interface on Windows

2007-08-04 Thread nac1967
I am a PostgreSQL user, using the native windows version 8.2. I am new to PostgreSQL and am wondering if other users have suggestions regarding command line interfaces. I cannot for the life of me get readline to work on the Windows version. If you use IPython, for example, readline works

Re: [GENERAL] v8.2 ... command line interface on Windows

2007-08-04 Thread Magnus Hagander
nac1967 wrote: I am a PostgreSQL user, using the native windows version 8.2. I am new to PostgreSQL and am wondering if other users have suggestions regarding command line interfaces. I cannot for the life of me get readline to work on the Windows version. If you use IPython, for example,

[GENERAL] clustering failover... ala Oracle Parallel server

2007-08-04 Thread hanasaki
clustering fail over... ala Oracle Parallel server How can the server be setup in a cluster for load-balancing and failover like perhaps OPS? How does the Postges solution compare to an Oracle? MSSQL? MySQL solution? Thank! ---(end of

[GENERAL] clustering failover... ala Oracle Parallel server

2007-08-04 Thread hanasaki
clustering fail over... ala Oracle Parallel server How can the server be setup in a cluster for load-balancing and failover like perhaps OPS? How does the Postges solution compare to an Oracle? MSSQL? MySQL solution? Thank! ---(end of

Re: [GENERAL] Porting MySQL data types to PostgreSQL

2007-08-04 Thread Tom Lane
Decibel! [EMAIL PROTECTED] writes: Be that as it may, I suspect that if someone puts forward a working set of uint2/4/8 it'd be considered for inclusion. The datatypes themselves are utterly trivial. The hard part, if you want them to be part of the numeric hierarchy, is figuring out what the

Re: [GENERAL] Help to solve configure error

2007-08-04 Thread Tom Lane
Rajaram J [EMAIL PROTECTED] writes: I have a HP-UX server and have downloaded the code for postgresql to compile and use the libraries. Do you have the real C compiler, or the toy one that HP gives people who don't fork over extra money for the real one? Testing with the bundled compiler here,

Re: [GENERAL] backend process terminates

2007-08-04 Thread Tom Lane
Geoffrey Myers [EMAIL PROTECTED] writes: The output from the gdb batch process may be found here: http://www.serioustechnology.com/gdbbatch.txt gdb isn't telling you the whole truth, evidently --- how'd control get from line 781 to 912 with nothing in between? Recompiling the backend with -O0

Re: [GENERAL] v8.2 ... command line interface on Windows

2007-08-04 Thread nac1967
On Aug 4, 3:08 pm, [EMAIL PROTECTED] (Magnus Hagander) wrote: nac1967 wrote: I am a PostgreSQL user, using the native windows version 8.2. I am new to PostgreSQL and am wondering if other users have suggestions regarding command line interfaces. I cannot for the life of me get readline to

Re: [GENERAL] v8.2 ... command line interface on Windows

2007-08-04 Thread nac1967
On Aug 4, 3:08 pm, [EMAIL PROTECTED] (Magnus Hagander) wrote: nac1967 wrote: I am a PostgreSQL user, using the native windows version 8.2. I am new to PostgreSQL and am wondering if other users have suggestions regarding command line interfaces. I cannot for the life of me get readline to

Re: [GENERAL] v8.2 ... command line interface on Windows

2007-08-04 Thread Bill Bartlett
Couldn't this be offered pre-built as an alternative in the Windows installer or as a psql2.exe program? Seems like there might be more than a few PostgreSQL users running with US keyboard layouts under native Windows, and providing the prebuilt version along with the normal one might eliminate

Re: [GENERAL] v8.2 ... command line interface on Windows

2007-08-04 Thread Bill Bartlett
We use the Cygwin version of the psql.exe program under Windows instead of the native psql.exe program, even though the rest of the PostgreSQL installation uses the standard native Windows versions of all the other PostgreSQL components (database, tools, etc.). (So before I get flamed, I want to

Re: [GENERAL] backend process terminates

2007-08-04 Thread Geoffrey
Tom Lane wrote: Geoffrey Myers [EMAIL PROTECTED] writes: The output from the gdb batch process may be found here: http://www.serioustechnology.com/gdbbatch.txt gdb isn't telling you the whole truth, evidently --- how'd control get from line 781 to 912 with nothing in between? Recompiling the

Re: [GENERAL] v8.2 ... command line interface on Windows

2007-08-04 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Bartlett wrote: Readline only works with US keyboard layouts under native windows, that's why it's been turned off in the binary builds. You are left with the very limited commandline editing in the default windows command shell. If you

Re: [GENERAL] Linux distro

2007-08-04 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Decibel! wrote: On Wed, Aug 01, 2007 at 08:22:24AM -0400, Kenneth Downs wrote: Ubuntu: What Windows wants to be, what the Mac is w/o the and with more control. I just replaced a hard drive in a dell machine. A ... Great graphics, great

Re: [GENERAL] Linux distro

2007-08-04 Thread Bruce McAlister
2. Mac OSX is proprietary even down to the hardware. That is enough for me to not use it. I gave up the whole IBM/SUN/SGI/HP fiasco of closed door unix and hardware a decade ago. Wow :) Maybe you need to re-visit Sun gear again, OpenSolaris, OpenCluster are only but a subset of the unix tools

Re: [GENERAL] Linux distro

2007-08-04 Thread Andrej Ricnik-Bay
On 8/5/07, Joshua D. Drake [EMAIL PROTECTED] wrote: [...] 3. Mac OSX is ugly. I know I just made a bunch of people poo in their leather pants but it is. It is really ugly. I want clean, out of my way, customizable interface that works the way I work. Not the way the kool aide drinking fan

Re: [GENERAL] Linux distro

2007-08-04 Thread Bruce Momjian
Joshua D. Drake wrote: 3. Mac OSX is ugly. I know I just made a bunch of people poo in their leather pants but it is. It is really ugly. I want clean, out of my way, customizable interface that works the way I work. Not the way the kool aide drinking fan boys of apple work. That being said,

Re: [GENERAL] Linux distro

2007-08-04 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruce McAlister wrote: 2. Mac OSX is proprietary even down to the hardware. That is enough for me to not use it. I gave up the whole IBM/SUN/SGI/HP fiasco of closed door unix and hardware a decade ago. Wow :) Maybe you need to re-visit Sun gear

Re: [GENERAL] Linux distro

2007-08-04 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruce Momjian wrote: Joshua D. Drake wrote: 3. Mac OSX is ugly. I know I just made a bunch of people poo in their leather pants but it is. It is really ugly. I want clean, out of my way, customizable interface that works the way I work. Not the