Re: [GENERAL] on delete cascade slowing down delete

2008-08-22 Thread Alban Hertroys
Is it going to make things faster if I: delete from s; reindex table s; Why do you think this step would help you any? There's no index on p to begin with. You'd just be reindexing the auto-generated unique index on s (due to it being a PK). delete from p; And no, this would most

[GENERAL] hi 5 mess...

2008-08-22 Thread andy petrella
Hello, I'm sorry about that email you received earlier about hi5... it was a mess (I've sent it to my whole gmail contact list :-s). Please forget about it. All apologize. andy petrella

Re: [GENERAL] on delete cascade slowing down delete

2008-08-22 Thread Ivan Sergio Borgonovo
On Fri, 22 Aug 2008 08:48:30 +0200 Alban Hertroys [EMAIL PROTECTED] wrote: Is it going to make things faster if I: delete from s; reindex table s; Why do you think this step would help you any? There's no index on p to begin with. You'd just be reindexing the auto-generated unique

[GENERAL] seq bug 2073 and time machine

2008-08-22 Thread Ivan Sergio Borgonovo
I was trying to drop a serial. Dropped the default for a column. Now it seems I can't drop the sequence since I incurred in: http://archives.postgresql.org/pgsql-bugs/2005-11/msg00304.php Is there a way I can still delete the sequence without using a backup? -- Ivan Sergio Borgonovo

[GENERAL] Script to export all privileges to csv or similar

2008-08-22 Thread Anton Melser
Hi, Does anyone know of a script/tool that allows one to export all users with all privileges? I realise I could construct a query to do it but google turned up nothing and if someone else has done the good work... Cheers Anton -- echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc

[GENERAL] problem with foreign keys + data-only backup

2008-08-22 Thread Peter Billen
Hi all, I have a problem with foreign keys and data-only (no schema) backup. I have a simple table node (pseudo-SQL): node ( integer node_idNOT NULLPRIMARY KEY; integer parent_node_id NULL; ) It contains the following two entries: node(1, NULL) the rood

[GENERAL] Postgresql 8.3 statistic stadistinct value dead wrong even with default_statistics_target=1000

2008-08-22 Thread Maxim Boguk
Some time ago i found one simple sql over large table eat whole ram+swap and almost killed server (postgresql 8.3.3 on 4gb freebsd server): After some exploring i found what happens: Query was over simple table: profiles=# \d+ counter_vis Table counter_vis Column| Type |

[GENERAL] LIKE and SIMILAR TO

2008-08-22 Thread c k
Hello all, As we are migrating our ERP application from MySQL to PostgreSQL we have some difficulties. One of them is use of Like and Similar to operators. We often use LIKE to search a string from front-end without case sensetivity. As postgreSQL's LIKE is case sensitive, we tried ILIKE and

Re: [GENERAL] LIKE and SIMILAR TO

2008-08-22 Thread RW
Maybe you should give tsearch2 a try and create a GIN index. Regex searches are sometimes a option. Robert c k wrote: Hello all, As we are migrating our ERP application from MySQL to PostgreSQL we have some difficulties. One of them is use of Like and Similar to operators. We often use LIKE

Re: [GENERAL] Script to export all privileges to csv or similar

2008-08-22 Thread Terry Lee Tucker
On Friday 22 August 2008 05:15, Anton Melser wrote: Hi, Does anyone know of a script/tool that allows one to export all users with all privileges? I realise I could construct a query to do it but google turned up nothing and if someone else has done the good work... Cheers Anton -- echo

Re: [GENERAL] LIKE and SIMILAR TO

2008-08-22 Thread Tino Wildenhain
Hi, c k wrote: Hello all, As we are migrating our ERP application from MySQL to PostgreSQL we have some difficulties. One of them is use of Like and Similar to operators. We often use LIKE to search a string from front-end without case sensetivity. As postgreSQL's LIKE is case sensitive, we

Re: [GENERAL] LIKE and SIMILAR TO

2008-08-22 Thread c k
Thanks to all, I will try to use tsearch2 with some other index and then reply. Regards, CPK On Fri, Aug 22, 2008 at 5:01 PM, Tino Wildenhain [EMAIL PROTECTED] wrote: Hi, c k wrote: Hello all, As we are migrating our ERP application from MySQL to PostgreSQL we have some difficulties. One

Re: [GENERAL] LIKE and SIMILAR TO

2008-08-22 Thread Ivan Sergio Borgonovo
On Fri, 22 Aug 2008 16:43:47 +0530 c k [EMAIL PROTECTED] wrote: Hello all, As we are migrating our ERP application from MySQL to PostgreSQL we have some difficulties. One of them is use of Like and Similar to operators. We often use LIKE to search a string from front-end without case

Re: [GENERAL] problem with foreign keys + data-only backup

2008-08-22 Thread Richard Huxton
Peter Billen wrote: Hi all, I have a problem with foreign keys and data-only (no schema) backup. I have a simple table node (pseudo-SQL): When I do a data-only backup, the backup file contains following two lines: INSERT INTO NODE (node_id, parent_node_id) VALUES (2, 1); INSERT INTO

Re: [GENERAL] problem with foreign keys + data-only backup

2008-08-22 Thread Markus Mehrwald
Hi, I do not think this will work. As far as I know foreign key checks are not triggers. Postgres is very strict with things concerning referential integrity so you cannot turn them off. Maybe it will help to use --orig-order for creating the dump. Markus Richard Huxton schrieb: Peter Billen

Re: [GENERAL] SERIAL datatype

2008-08-22 Thread Sam Mason
On Thu, Aug 21, 2008 at 09:08:24PM +0200, Peter Billen wrote: Is it possible to insert a new entry? Will the serial sequence somehow be able to find the gap (3)? As others have said, no it's not going to. Sequences will only return values out of order when explicitly told to. The main reason

Re: [GENERAL] Postgresql 8.3 statistic stadistinct value dead wrong even with default_statistics_target=1000

2008-08-22 Thread Tom Lane
Maxim Boguk [EMAIL PROTECTED] writes: [ ndistinct estimates way off ] Estimating the number of distinct values in a distribution with a long tail is just a really hard problem :-( regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] problem with foreign keys + data-only backup

2008-08-22 Thread Alvaro Herrera
Markus Mehrwald wrote: Hi, I do not think this will work. As far as I know foreign key checks are not triggers. Postgres is very strict with things concerning referential integrity so you cannot turn them off. Actually you are mistaken -- FKs are triggers, and you can turn them off. There

Re: [GENERAL] Single character bitfields

2008-08-22 Thread Decibel!
On Aug 21, 2008, at 3:45 AM, Tomasz Ostrowski wrote: - one byte char (with quotes), but it is a non standard, integral type, will cause interface problems and I don't know if it will not be deprecated some time. It's used in the catalogs, so I'd say the odds of it getting replaced anytime

Re: [GENERAL] AT TIME ZONE and DST in UTC-CET conversion

2008-08-22 Thread Bruce Momjian
Tom Lane wrote: Gregory Stark [EMAIL PROTECTED] writes: ISTM this is the one that's wrong. CET is standard time, it, GMT+1. If you want a timezone which switches between CET and CST automatically you should use something like Europe/Paris. Well, actually he *is* using such a zone:

[GENERAL] Auto recovery feature

2008-08-22 Thread c k
Hello all, As I know and have seen that innodb engine of MySQL does an auto-recovery when MySQL server is crashed or due to power failure. What is with postgreSQL? Does it makes an auto-recovery? and how? Thanks CPK

Re: [GENERAL] [ADMIN] Auto recovery feature

2008-08-22 Thread c k
Thanks CPK On Fri, Aug 22, 2008 at 11:36 PM, Tomeh, Husam [EMAIL PROTECTED]wrote: Postgres, like any descent RDBMS, performs an auto instance crash recovery using its transaction logs. Regards, Husam -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL

Re: [GENERAL] [ADMIN] Auto recovery feature

2008-08-22 Thread Tomeh, Husam
Postgres, like any descent RDBMS, performs an auto instance crash recovery using its transaction logs. Regards, Husam From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of c k Sent: Friday, August 22, 2008 11:02 AM To:

[GENERAL] Installing Postgre 8.3 with a command

2008-08-22 Thread Anderson dos Santos Donda
Hi all !! On Windows, we can install the postgre 8.3 with a command, without windows setup to install it, like on linux?

Re: [GENERAL] Installing Postgre 8.3 with a command

2008-08-22 Thread Thomas Kellerer
Anderson dos Santos Donda wrote on 22.08.2008 22:53: Hi all !! On Windows, we can install the postgre 8.3 with a command, without windows setup to install it, like on linux? http://pginstaller.projects.postgresql.org/silent.html -- Sent via pgsql-general mailing list

Re: [GENERAL] Installing Postgre 8.3 with a command

2008-08-22 Thread Anderson dos Santos Donda
Thanks Man!!! I'll try and reply if i have any problems!! On Fri, Aug 22, 2008 at 6:02 PM, Thomas Kellerer [EMAIL PROTECTED] wrote: Anderson dos Santos Donda wrote on 22.08.2008 22:53: Hi all !! On Windows, we can install the postgre 8.3 with a command, without windows setup to install

[GENERAL] Ranking?

2008-08-22 Thread Ruben Gouveia
Since there is no current solution to ranking values in pl/pgsql as the rank() over (partition by... that there is in oracle i am hoping someone can help me out here. The table i created contains the following columns: rank | value I wrote a cursor that will give me all the

[GENERAL] Can´t write nothing in \bin folder in windows

2008-08-22 Thread Gustavo Ces
Hi all, well, it´s just a windows xp professional file permisions problem, but some other folk had the same problem so... i´m trying to upgrade my postgresql version ( it was 8.2) in windows , so i' ve downloaded and installed postgresql 8.3.3.1 When i try to install postgis 1.3.3

[GENERAL] Re: can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-22 Thread Dale
On Aug 20, 3:02 pm, [EMAIL PROTECTED] (Scott Marlowe) wrote: On Tue, Aug 19, 2008 at 9:51 PM, Dale Harris [EMAIL PROTECTED] wrote: As per the original message: UPDATE EntityRelation SET Status = inStatus, Modified = Session_TimeStamp(), ModifiedBy = UserID() WHERE (RelationID =

Re: [GENERAL] function SETOF return type with variable columns?

2008-08-22 Thread James Neff
Merlin Moncure wrote: On Wed, Aug 20, 2008 at 12:59 PM, James Neff [EMAIL PROTECTED] wrote: Greetings, Is it possible to have a function with a return type of SETOF that has variable number of return columns? On Wed, Aug 20, 2008 at 10:08 PM, Tom Lane [EMAIL PROTECTED] wrote:

Re: [GENERAL] Re: can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-22 Thread Scott Marlowe
On Wed, Aug 20, 2008 at 11:25 PM, Dale [EMAIL PROTECTED] wrote: This afternoon I'm starting to notice that pgAdmin III for Windows sometimes gives erratic error messages when there is no error or the error is actually different. I know this because when I recompile after moving the cursor,

Re: [GENERAL] Ranking?

2008-08-22 Thread David Fetter
On Fri, Aug 22, 2008 at 02:30:46PM -0700, Ruben Gouveia wrote: Since there is no current solution to ranking values in pl/pgsql as the rank() over (partition by... that there is in oracle i am hoping someone can help me out here. It seems likely that the windowing functions patch will get