Re: [GENERAL] Stored Procedures and Functions

2007-06-04 Thread Albe Laurenz
Harpreet Dhaliwal wrote: Is it true that postgres doesn't have a notion of Stored Procedures and functions is what it has instead? RDBMS like Sql Server supports both stored procedures and functions. So I was wondering what is the difference between a Stored Procedure and a function. I

[GENERAL] changing 'mons' in interval?

2007-06-04 Thread Klint Gore
Is there a way to change mons in interval::text to the full word months without resorting to replace(aninterval::text,'mon','Month')? If it can handle locales as well that would be good (but I could live without it). klint. +---+-+ : Klint

[GENERAL] Tablespaces

2007-06-04 Thread John Gardner
I've been testing one of our apps on PostgreSQL for the last few months and I'm about ready to put it on the production server, but I need advice on where to locate the tablespace. I've been so concerned getting the app working, I haven't even considered this yet. I'm using a RPM install of

Re: [GENERAL] [HACKERS] table partitioning pl/pgsql helpers

2007-06-04 Thread Enrico Sirola
Il giorno 02/giu/07, alle ore 00:53, Jim Nasby ha scritto: Dropping -hackers; that list is for development of the database engine itself. ok, sorry e. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [GENERAL] Tablespaces

2007-06-04 Thread Richard Huxton
John Gardner wrote: I've been testing one of our apps on PostgreSQL for the last few months and I'm about ready to put it on the production server, but I need advice on where to locate the tablespace. I've been so concerned getting the app working, I haven't even considered this yet. I'm using

[GENERAL] simple select question

2007-06-04 Thread Erol KAHRAMAN
hi guys, i am newbie in postgresql. I need some help; i am trying to write like this: select * from TABLE where IN ('value1','valeue2',) but is it possible to give values from file. select * from TABLE where IN file -- Erol KAHRAMAN System Network Administrator

Re: [GENERAL] table partitioning pl/pgsql helpers

2007-06-04 Thread Enrico Sirola
Hi Robert, Il giorno 01/giu/07, alle ore 04:08, Robert Treat ha scritto: [...] We I set these up for our clients, I typically seperate the partition creation piece from the data insertion piece. (Mostly as partition creation, especially with rules, is a table locking event, which is better

Re: [GENERAL] simple select question

2007-06-04 Thread Richard Huxton
Erol KAHRAMAN wrote: hi guys, i am newbie in postgresql. I need some help; i am trying to write like this: select * from TABLE where IN ('value1','valeue2',) You'll need to provide a column-name: ... WHERE mycolumn IN (...) but is it possible to give values from file. select * from

Re: [GENERAL] simple select question

2007-06-04 Thread Ragnar
On mán, 2007-06-04 at 12:12 +0300, Erol KAHRAMAN wrote: hi guys, i am newbie in postgresql. I need some help; i am trying to write like this: select * from TABLE where IN ('value1','valeue2',) ... WHERE what IN (...) ? but is it possible to give values from file. select * from

Re: [GENERAL] changing 'mons' in interval?

2007-06-04 Thread Martijn van Oosterhout
On Mon, Jun 04, 2007 at 06:51:37PM +1000, Klint Gore wrote: Is there a way to change mons in interval::text to the full word months without resorting to replace(aninterval::text,'mon','Month')? If it can handle locales as well that would be good (but I could live without it). Have you

Re: [GENERAL] Numeric performances

2007-06-04 Thread Lincoln Yeoh
At 01:42 AM 6/1/2007, Alvaro Herrera wrote: Vincenzo Romano escribió: Hi all. I'd like to know whether there is any real world evaluation (aka test) on performances of the NUMERIC data type when compared to FLOAT8 and FLOAT4. The documentation simply says that the former is much slower than

Re: [GENERAL] Tablespaces

2007-06-04 Thread Albe Laurenz
I've been testing one of our apps on PostgreSQL for the last few months and I'm about ready to put it on the production server, but I need advice on where to locate the tablespace. I've been so concerned getting the app working, I haven't even considered this yet. I'm using a RPM install

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-04 Thread Teodor Sigaev
2007-06-01 23:00:00.001 CEST:% LOG: GIN incomplete splits=8 Just to be sure: patch fixes *creating* of WAL log, not replaying. So, primary db should be patched too. During weekend I found possible deadlock in locking protocol in GIN between concurrent UPDATE and VACUUM queries with the

Re: [GENERAL] Numeric performances

2007-06-04 Thread PFC
It is. But why do you care? You either have the correctness that NUMERIC gives, or you don't. I suspect it's still useful to know what order of magnitude slower it is. After all if it is 1000x slower (not saying it is), some people may decide it's not worth it or roll their own. Any

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-04 Thread Teodor Sigaev
1. After a certain point, consecutive GIN index splits cause a problem. The new RHS block numbers are consecutive from 111780+ That's newly created page. Splitted page might have any number 2. The incomplete splits stay around indefinitely after creation and we aren't trying to remove the

Re: [GENERAL] Numeric performances

2007-06-04 Thread Vincenzo Romano
Hmmm ... It sounds quite strange to me that numeric is faster than bigint. Even if bigint didn't get hw support in the CPU it should have been faster that numeric as it should be mapped in 2 32-bits integers. Numeric algorithms should be linear (according to the number of digits) in complexity

Re: [GENERAL] why postgresql over other RDBMS

2007-06-04 Thread Alban Hertroys
Tom Lane wrote: Right. Multiple seqscans that are anywhere near reading the same block of a table will tend to self-synchronize. There is a patch under consideration for 8.3 that helps this along by making seqscans run circularly --- that is, not always from block 0 to block N, but from

Re: [GENERAL] PITR Base Backup on an idle 8.1 server

2007-06-04 Thread Marco Colombo
Greg Smith wrote: The way you're grabbing files directly from the xlog directory only works because your commit workload is so trivial that you can get away with it, and because you haven't then tried to apply future archive logs. Well, it's only because I don't need future logs, just like I

[GENERAL] Jumping Weekends

2007-06-04 Thread Ranieri Mazili
Hello, (sorry for my poor english) It's my first post here, and my doubt is very simple (I guess). I have a function to populate a table, into WHILE I have the follow piece of code: --Jump Weekend IF (SELECT TO_CHAR(CAST(PRODUCTION_DATE as date),'Day')) = 'Saturday' THEN

Re: [GENERAL] Numeric performances

2007-06-04 Thread PFC
This is a 32 bit CPU by the way. Consider this : - There are 100K rows - The CPU executes about 3 billion instructions per second if everything is optimum - SELECT sum(n) FROM test, takes, say 60 ms This gives about 1800 CPU ops per row. A Float addition

Re: [GENERAL] multimaster

2007-06-04 Thread Tino Wildenhain
Alexander Staubo schrieb: On 6/1/07, Andrew Sullivan [EMAIL PROTECTED] wrote: These are all different solutions to different problems, so it's not surprising that they look different. This was the reason I asked, What is the problem you are trying to solve? You mean aside from the obvious

Re: [GENERAL] debugging C functions

2007-06-04 Thread Gregory Stark
Islam Hegazy [EMAIL PROTECTED] writes: I do the same but I use the ddd debugger 1) Load the shared library from the SQL 2) Open the .c file of my function 3) Place the break points 4) Execute the sql statement 'Select * from Myfn(...);' The result is displayed and the debugger doesn't stop

Re: [GENERAL] Corruption of files in PostgreSQL

2007-06-04 Thread Franz . Rasper
What OS are you running ? Linux(32 or 64 Bit)? Ext 3 Filesystem ? Wich Kernel Version ? Bug in Ext 3/Linux Kernel/Hardware(Raid Controller ?) ? Does the error only happens under heavy load ? regards, -Franz -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-04 Thread Teodor Sigaev
Ooops. Patch doesn't apply cleanly. New version. Attached patch fixes that deadlock bug too. And, previous version of my patch has a mistake which is observable on CREATE INDEX .. USING GIN query. -- Teodor Sigaev E-mail: [EMAIL PROTECTED]

Re: [GENERAL] Numeric performances

2007-06-04 Thread Vincenzo Romano
I'm getting more confused. If the algorithm used to do the sum is a drop in the sea, then the resources needed to pass a pointer on the stack are a molecule in the drop! :-) Nonetheless I think that your directions are right: doing actual queries instead of inspecting the algorithms themselves

Re: [GENERAL] [SQL] Jumping Weekends

2007-06-04 Thread Pavel Stehule
Hello, you forgot on sunday. Your solution can work, but isn't too efective you can do: production_date := production_date + CASE extract(dow from production_date) WHEN 0 THEN 1 -- sunday WHEN 6 THEN 2 -- saturday ELSE 0 END; there isn't slower string comparation and it's one sql

Re: [GENERAL] multimaster

2007-06-04 Thread Alexander Staubo
On 6/4/07, Tino Wildenhain [EMAIL PROTECTED] wrote: Did you have a look at BizgresMPP? Especially for your shared-nothing approach it seems to be a better solution then just replicating everything. I had completely forgotten about that one. Bizgres.org seems down at the moment, but looking at

Re: [GENERAL] Tablespaces

2007-06-04 Thread Ray Stell
On Mon, Jun 04, 2007 at 09:49:03AM +0100, John Gardner wrote: /var/lib/pgsql/data/. Shall I just create a directory under here and point the tablespace to there? Any advice would be appreciated. One of the points of ts is to balance io over different controllers/disks. Someone should

Re: [Fwd: Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum]

2007-06-04 Thread Andrew Sullivan
On Fri, Jun 01, 2007 at 01:27:14PM -0700, Ron St-Pierre wrote: imp=# select age(datfrozenxid) from pg_database where datname = 'imp'; age 1571381411 (1 row) Time to start VACUUM FULL ANALYZE over the weekend. I guess this comes too late, but you don't need VACUUM

Re: [Re] Re: [GENERAL] Winsock error 10035 while trying to upgrade from 8.0 to 8.2

2007-06-04 Thread Magnus Hagander
On Tue, May 29, 2007 at 11:25:30PM +0200, Magnus Hagander wrote: What do you think ? may be a bug in the windows server installation I have (this machines have not been updated for some times, perhaps I should try to do that and see if the problem is still there. In the long run,

Re: [GENERAL] High-availability

2007-06-04 Thread Andrew Sullivan
On Sun, Jun 03, 2007 at 01:35:49PM -0400, Lew wrote: How much data do you put in the DB? Oracle has a free version, but it has size limits. AFAIK, Oracle's free version doesn't include RAC, which is what would be needed to satisfy the request anyway. A -- Andrew Sullivan | [EMAIL

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-04 Thread Andrew Sullivan
On Mon, Jun 04, 2007 at 12:37:42AM +0200, PFC wrote: NULL usually means unknown or not applicable Aaaargh! No, it doesn't. It means NULL. Nothing else. If it meant unknown or not applicable or anything else, then SELECT * FROM nulltbl a, othernulltbl b WHERE

Re: [GENERAL] Corruption of files in PostgreSQL

2007-06-04 Thread Franz . Rasper
If there is any database driver (which was bild with the old postgresql sources/libs), (re)build this driver with the new postgresql sources/libs. Greetings, -Franz -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Paolo Bizzarri Gesendet:

Re: [GENERAL] High-availability

2007-06-04 Thread Chander Ganesan
Madison Kelly wrote: Hi all, After realizing that 'clustering' in the PgSQL docs means multiple DBs behind one server, and NOT multple machines, I am back at square one, feeling somewhat the fool. :P Can anyone point me to docs/websites that discuss options on replicating in (as close

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-04 Thread Ian Harding
On 6/3/07, PFC [EMAIL PROTECTED] wrote: Yeah, it is awful ;^) However the existing system is equally awful because there is no way to enter NULL! Consider this form : First name :Edgar Middle name : J. Last name : Hoover Now, if someone has no middle name, like John Smith,

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-04 Thread Owen Hartnett
At 12:37 AM +0200 6/4/07, PFC wrote: Yeah, it is awful ;^) However the existing system is equally awful because there is no way to enter NULL! Consider this form : First name :Edgar Middle name : J. Last name : Hoover Now, if someone has no middle name, like John Smith, should we

[GENERAL] what to do when pg_cancel_backend() doesnt work?

2007-06-04 Thread Rhys Stewart
Well, that pretty much sums it up. pg_cancel_backend() is not working. The query is still there. The box is across the city and the admin is not in, is there a way to remote restart the server from within PG? ---(end of broadcast)--- TIP 6:

Re: [Fwd: Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum]

2007-06-04 Thread Ron St-Pierre
Andrew Sullivan wrote: On Fri, Jun 01, 2007 at 01:27:14PM -0700, Ron St-Pierre wrote: imp=# select age(datfrozenxid) from pg_database where datname = 'imp'; age 1571381411 (1 row) Time to start VACUUM FULL ANALYZE over the weekend. I guess this comes too late,

Re: [GENERAL] Numeric performances

2007-06-04 Thread Tom Lane
Vincenzo Romano [EMAIL PROTECTED] writes: It sounds quite strange to me that numeric is faster than bigint. This test is 100% faulty, because it fails to consider the fact that the accumulator used by sum() isn't necessarily the same type as the input data. In fact we sum ints in a bigint and

Re: [GENERAL] High-availability

2007-06-04 Thread Madison Kelly
Chander Ganesan wrote: Madison Kelly wrote: Hi all, After realizing that 'clustering' in the PgSQL docs means multiple DBs behind one server, and NOT multple machines, I am back at square one, feeling somewhat the fool. :P Can anyone point me to docs/websites that discuss options on

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-04 Thread Richard Huxton
Andrew Sullivan wrote: On Mon, Jun 04, 2007 at 12:37:42AM +0200, PFC wrote: NULL usually means unknown or not applicable Aaaargh! No, it doesn't. It means NULL. Nothing else. If it meant unknown or not applicable or anything else, then SELECT * FROM nulltbl a, othernulltbl b

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-04 Thread Greg Smith
On Mon, 4 Jun 2007, Ian Harding wrote: The hazard with doing stuff like that is some joker could name their kid Billy NMN Simpson. Or this http://www.snopes.com/autos/law/noplate.asp That settles it; I'm getting custom plates with NULL on them just to see if it makes it impossible for me to

Re: [Fwd: Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum]

2007-06-04 Thread Martijn van Oosterhout
On Mon, Jun 04, 2007 at 07:34:13AM -0700, Ron St-Pierre wrote: What do you mean by this? I wanted to do both a VACUUM ANALYZE and a VACUUM FULL, so ran VACUUM FULL ANALYZE. Is there something odd about VACUUM FULL, other than locking the table it's working on? It tends to bloat indexes.

Re: [GENERAL] High-availability

2007-06-04 Thread Bohdan Linda
On Mon, Jun 04, 2007 at 04:21:32PM +0200, Chander Ganesan wrote: I think you'll typically find that you can get one or the other - synchronous replication, or load balancing...but not both. On the other Hi, I am in very similar position, but I am more failover oriented. I am considering

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-04 Thread Alexander Staubo
On 6/4/07, Andrew Sullivan [EMAIL PROTECTED] wrote: On Mon, Jun 04, 2007 at 12:37:42AM +0200, PFC wrote: NULL usually means unknown or not applicable Aaaargh! No, it doesn't. It means NULL. Nothing else. If it meant unknown or not applicable or anything else, then SELECT * FROM

[GENERAL] current_date / datetime stuff

2007-06-04 Thread Joshua
Hello, I was hoping someone here may be able to help me out with this one: Is there anything similiar to: SELECT current_date; that will return the date of the first Monday of the month? Please let me know. Thanks, Joshua ---(end of

[GENERAL] Can someone have a look at my pg_hba.conf file ?

2007-06-04 Thread Steven De Vriendt
Hi, I'm trying to reach my postgres database via a remote connection. Yet my connection is refused when I try to do that. I'm using Ubuntu Feisty Following lines are now in my pg_hba.conf-file: # TYPE DATABASEUSERCIDR-ADDRESS METHOD # local is for Unix domain socket

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-04 Thread Andrew Sullivan
On Mon, Jun 04, 2007 at 03:38:01PM +0100, Richard Huxton wrote: Well, a strict unknown is fine - so long as it means just that. How tall is Andrew? Unknown How tall is Richard? Unknown Are Andrew and Richard the same height? Unknown The problem is the slippery-slope from unknown to

Re: [GENERAL] what to do when pg_cancel_backend() doesnt work?

2007-06-04 Thread Alvaro Herrera
Rhys Stewart escribió: Well, that pretty much sums it up. pg_cancel_backend() is not working. The query is still there. The box is across the city and the admin is not in, is there a way to remote restart the server from within PG? It is probably a bug and if you gives us some information we

Re: [Fwd: Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum]

2007-06-04 Thread Andrew Sullivan
On Mon, Jun 04, 2007 at 07:34:13AM -0700, Ron St-Pierre wrote: VACUUM FULL _does not_ mean vacuum everything! What do you mean by this? Sorry, I was trying to prevent you doing a VACUUM FULL you didn't want (but another message said you actually intended a vacuum full). Several people have

Re: [GENERAL] what to do when pg_cancel_backend() doesnt work?

2007-06-04 Thread Rhys Stewart
well there is the info below: GISDEV=# select version(); version -- PostgreSQL 8.1.5 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special) (1 row)

Re: [GENERAL] what to do when pg_cancel_backend() doesnt work?

2007-06-04 Thread Rhys Stewart
a more readable version GISDEV=# select version(); version -- PostgreSQL 8.1.5 on i686-pc-mingw32, compiled by GCC gcc.exe

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-04 Thread Frank Wittig
After some observation of massive reindexing of some hundred thousand data sets it seems to me that the slave doesn't skip checkpoints anymore. (Apart from those skipped because of the CheckpointTimeout thing) I'll keep an eye on it and report back any news on the issue. Thank you for the good

Re: [GENERAL] Can someone have a look at my pg_hba.conf file ?

2007-06-04 Thread Tom Lane
Steven De Vriendt [EMAIL PROTECTED] writes: I'm trying to reach my postgres database via a remote connection. Yet my connection is refused when I try to do that. I think you need to fix listen_addresses, not pg_hba.conf. regards, tom lane

Re: [GENERAL] what to do when pg_cancel_backend() doesnt work?

2007-06-04 Thread Alvaro Herrera
Rhys Stewart escribió: a more readable version What is this buffer() function? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support ---(end of

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-04 Thread Teodor Sigaev
After some observation of massive reindexing of some hundred thousand data sets it seems to me that the slave doesn't skip checkpoints anymore. (Apart from those skipped because of the CheckpointTimeout thing) I'll keep an eye on it and report back any news on the issue. Nice, committed. Thank

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-04 Thread PFC
Aaaargh! No, it doesn't. It means NULL. Nothing else. Well, x = UNKNOWN doesn't make any sense... the answer is UNKNOWN. x IS UNKNOWN does make sense, the answer is true or false. Replace UNKNOWN with NULL... Actually it means what the DBA wants it to mean (which opens the

Re: [GENERAL] Numeric performances

2007-06-04 Thread PFC
If you try it with max() you'd likely get less-surprising answers. So it was in fact the type conversions that got timed. Damn. I got outsmarted XDD Rewind : CREATE TEMPORARY TABLE test AS SELECT a::FLOAT AS f, (a::NUMERIC)*100 AS n, a::INTEGER AS i,

[GENERAL] pg_dump: ERROR: could not open relation with OID ...

2007-06-04 Thread Thomas F. O'Connell
During a routine backup procedure (that does not run nightly) for an 8.2.3 postgres cluster, pg_dump failed: pg_dump: Error message from server: ERROR: could not open relation with OID ... In doing some log forensics, I discovered that this error has been showing up in the logs

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-04 Thread Zoltan Boszormenyi
Alexander Staubo írta: On 6/4/07, Andrew Sullivan [EMAIL PROTECTED] wrote: On Mon, Jun 04, 2007 at 12:37:42AM +0200, PFC wrote: NULL usually means unknown or not applicable Aaaargh! No, it doesn't. It means NULL. Nothing else. If it meant unknown or not applicable or anything else, then

[GENERAL] Moving pg_xlog to another drive

2007-06-04 Thread Ben
I'm trying to move my WAL to another drive, but am having difficulties with this seemingly simple process. Every time I start up with pg_xlog symlinked to my other drive, I get this: FATAL: could not open file pg_xlog/0001.history: Permission denied If I move pg_xlog back into its normal

Re: [GENERAL] pg_dump: ERROR: could not open relation with OID ...

2007-06-04 Thread Alvaro Herrera
Thomas F. O'Connell wrote: During a routine backup procedure (that does not run nightly) for an 8.2.3 postgres cluster, pg_dump failed: pg_dump: Error message from server: ERROR: could not open relation with OID ... In doing some log forensics, I discovered that this error has been

Re: [GENERAL] Moving pg_xlog to another drive

2007-06-04 Thread Joshua D. Drake
Ben wrote: I'm trying to move my WAL to another drive, but am having difficulties with this seemingly simple process. Every time I start up with pg_xlog symlinked to my other drive, I get this: FATAL: could not open file pg_xlog/0001.history: Permission denied If I move pg_xlog back

Re: [GENERAL] Moving pg_xlog to another drive

2007-06-04 Thread Alvaro Herrera
Ben wrote: I'm trying to move my WAL to another drive, but am having difficulties with this seemingly simple process. Every time I start up with pg_xlog symlinked to my other drive, I get this: FATAL: could not open file pg_xlog/0001.history: Permission denied If I move pg_xlog

[GENERAL] COPY error

2007-06-04 Thread ABHANG RANE
Hi, Im trying to load data from a file using copy command. At the end of the data, I have appended copy statement as copy tablename(col1, col2) from stdin with delimiter as '\t'; .\ But I get following error. ERROR: syntax error at or near 2713 LINE 1: 2713

Re: [GENERAL] Moving pg_xlog to another drive

2007-06-04 Thread Ben
On Mon, 4 Jun 2007, Joshua D. Drake wrote: Ben wrote: I'm trying to move my WAL to another drive, but am having difficulties with this seemingly simple process. Every time I start up with pg_xlog symlinked to my other drive, I get this: FATAL: could not open file pg_xlog/0001.history:

Re: [GENERAL] Moving pg_xlog to another drive

2007-06-04 Thread Steve Atkins
On Jun 4, 2007, at 11:15 AM, Ben wrote: On Mon, 4 Jun 2007, Joshua D. Drake wrote: Ben wrote: I'm trying to move my WAL to another drive, but am having difficulties with this seemingly simple process. Every time I start up with pg_xlog symlinked to my other drive, I get this: FATAL:

[GENERAL] Encrypted column

2007-06-04 Thread Ranieri Mazili
Hello, I need to store users and passwords on a table and I want to store it encrypted, but I don't found documentation about it, how can I create a table with columns user and password with column password encrypted and how can I check if user and password are correct using a sql query ?

Re: [GENERAL] Moving pg_xlog to another drive

2007-06-04 Thread Ben
On Mon, 4 Jun 2007, Steve Atkins wrote: Are you running SELinux? It's main goal in life is to break disk access by denying permission to files anywhere other than where it thinks an application should be allowed to access. Bleh. I am, but I *thought* it was not enforcing. Seems I was wrong.

Re: [GENERAL] [SQL] Encrypted column

2007-06-04 Thread Gary Chambers
I need to store users and passwords on a table and I want to store it encrypted, but I don't found documentation about it, how can I create a Take a look at the pgcrypto user-contributed module. -- Gary Chambers // Nothing fancy and nothing Microsoft! ---(end of

Re: [GENERAL] debugging C functions

2007-06-04 Thread Islam Hegazy
Yes, I am sure. If I placed a breakpoint in any file, e.g. execMain.c, the debugger would enter this file. Islam Hegazy - Original Message - From: Gregory Stark [EMAIL PROTECTED] To: Islam Hegazy [EMAIL PROTECTED] Cc: Tom Lane [EMAIL PROTECTED]; Joe Conway [EMAIL PROTECTED];

[GENERAL] Inserting a path into Database

2007-06-04 Thread Ranieri Mazili
Hello, I need to insert a path into a table, but because \ I have a error by postgres, so how can I insert a path like bellow into a table: insert into production values ('C:\Program Files\My program'); I appreciate any help Thanks ---(end of

Re: [GENERAL] [SQL] Inserting a path into Database

2007-06-04 Thread Shoaib Mir
If you are on 8.1 you can use double qoutes ( 'C:\\Program Files\\My program' ) on in 8.2 you can use the new backslash_quote (string) setting. You can find help on backslash_quote (string) at -- http://www.postgresql.org/docs/current/static/runtime-config-compatible.html -- Shoaib Mir

Re: [GENERAL] Inserting a path into Database

2007-06-04 Thread Mario Guenterberg
On Mon, Jun 04, 2007 at 05:10:48PM -0300, Ranieri Mazili wrote: Hello, I need to insert a path into a table, but because \ I have a error by postgres, so how can I insert a path like bellow into a table: insert into production values ('C:\Program Files\My program'); Use double

Re: Partitioning (was Re: [GENERAL] Slightly OT.)

2007-06-04 Thread Jeff Davis
On Fri, 2007-06-01 at 22:13 -0500, Ron Johnson wrote: On 06/01/07 19:29, Jeff Davis wrote: [snip] You shouldn't use a volatile function in a check constraint. Use a trigger instead, but even that is unlikely to work for enforcing constraints correctly. In general, for partitioning,

Re: [GENERAL] PITR Base Backup on an idle 8.1 server

2007-06-04 Thread Simon Riggs
On Mon, 2007-06-04 at 12:55 +0200, Marco Colombo wrote: Greg Smith wrote: The way you're grabbing files directly from the xlog directory only works because your commit workload is so trivial that you can get away with it, and because you haven't then tried to apply future archive logs.

Re: [GENERAL] Corruption of files in PostgreSQL

2007-06-04 Thread Scott Marlowe
Paolo Bizzarri wrote: On 6/2/07, Tom Lane [EMAIL PROTECTED] wrote: Paolo Bizzarri [EMAIL PROTECTED] writes: On 6/2/07, Tom Lane [EMAIL PROTECTED] wrote: Please provide a reproducible test case ... as explained above, the problem seems quite random. So I need to understand what we have to

Re: [GENERAL] Transactional DDL

2007-06-04 Thread David Fetter
On Sat, Jun 02, 2007 at 04:51:13PM -0400, Harpreet Dhaliwal wrote: my bad.. i replied to that in a wrong thread. sorry That is one of many reasons that smart people don't top post. Had you decided not to top post, you would have realized instantly that you were in the wrong thread. If there is

Re: [GENERAL] Inserting a path into Database

2007-06-04 Thread Michael Glaesemann
On Jun 4, 2007, at 15:10 , Ranieri Mazili wrote: I need to insert a path into a table, but because \ I have a error by postgres, so how can I insert a path like bellow into a table: insert into production values ('C:\Program Files\My program'); In v8.0 and later you can use

Re: [GENERAL] debugging C functions

2007-06-04 Thread Islam Hegazy
It worked today with me and I discovered what is the problem. The problem is that I have 2 structures that contain pointers. I inistiate variables from these structures as static. I can't declare the pointers inside the struct as static. Now the problem is that when the function is called a

Re: [GENERAL] SELECT all fields except bad_field from mytbl;

2007-06-04 Thread Erwin Brandstetter
On May 30, 7:42 am, [EMAIL PROTECTED] (PFC) wrote: Python example : I found a decent solution for the existing plpgsql function (as posted). Thanks a lot for the insight into the Python way, though! Regards Erwin ---(end of

Re: [GENERAL] SELECT all fields except bad_field from mytbl;

2007-06-04 Thread Erwin Brandstetter
Or even, slightly shorter: EXECUTE 'SELECT ' || array_to_string(ARRAY( SELECT a.attname FROM pg_class c, pg_namespace n, pg_attribute a WHERE n.oid = c.relnamespace AND a.attrelid = c.oid AND a.attnum = 1 AND n.nspname = 'myschema' AND c.relname = 'mytbl'

Re: [GENERAL] Encrypted column

2007-06-04 Thread Guy Rouillier
Ranieri Mazili wrote: Hello, I need to store users and passwords on a table and I want to store it encrypted, but I don't found documentation about it, how can I create a table with columns user and password with column password encrypted and how can I check if user and password are correct

Re: [GENERAL] what to do when pg_cancel_backend() doesnt work?

2007-06-04 Thread Michael Fuhr
On Mon, Jun 04, 2007 at 12:00:10PM -0400, Alvaro Herrera wrote: Rhys Stewart escribió: a more readable version What is this buffer() function? Looks like the PostGIS buffer() function, which calls GEOSBuffer() in the GEOS library, which is where the code might be stuck.

Re: [GENERAL] changing 'mons' in interval?

2007-06-04 Thread Klint Gore
On Mon, 4 Jun 2007 11:43:08 +0200, Martijn van Oosterhout [EMAIL PROTECTED] wrote: On Mon, Jun 04, 2007 at 06:51:37PM +1000, Klint Gore wrote: Is there a way to change mons in interval::text to the full word months without resorting to replace(aninterval::text,'mon','Month')? If it can

[GENERAL] PostgreSQL abnormally terminating with signal 5

2007-06-04 Thread Carlos H. Reimer
Hi, I´ve a PostgreSQL 8.0.13 running in a Windows XP Pro 2002 SP2 box that is terminating abnormally with signal code 5 every time I make a simple select in one of our tables. 2007-06-04 21:24:12 LOG: database system was shut down at 2007-06-04 21:23:42 E. South America Standard Time 2007-06-04

Re: [GENERAL] There can be only one! How to avoid the highlander-problem.

2007-06-04 Thread Erwin Brandstetter
Hi Lew! Thank you for your comments. I have elaborated on them. On Jun 3, 7:22 pm, Lew [EMAIL PROTECTED] wrote: (...) The trouble with this is that it models kingship as an attribute of every man. (What, no female rulers allowed?) Yeah, saddening, isn't it? Actually, for simplicity's sake I

Re: [GENERAL] what to do when pg_cancel_backend() doesnt work?

2007-06-04 Thread Alvaro Herrera
Michael Fuhr escribió: On Mon, Jun 04, 2007 at 12:00:10PM -0400, Alvaro Herrera wrote: Rhys Stewart escribió: a more readable version What is this buffer() function? Looks like the PostGIS buffer() function, which calls GEOSBuffer() in the GEOS library, which is where the code might

[GENERAL] $libdir

2007-06-04 Thread Ian Harding
I know this is a question that gets asked a zillion times and is almost always pilot error. I installed PostgreSQL 8.2.x and the Tsearch2 package on NetBSD which went fine, but I can't get the tsearch2.sql file to run. The usual error about file does not exist relative to $libdir/tsearch2 gets