Re: [SQL] C function extending postgres

2005-03-21 Thread Theo Galanakis
Title: RE: [SQL] C function extending postgres Sorted Jonathan, thankyou for your help. -Original Message- From: Jonathan Daugherty [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 22 March 2005 4:32 PM To: pgsql-sql@postgresql.org Subject: Re: [SQL] C function extending postgres # I'm

Re: [SQL] C function extending postgres

2005-03-21 Thread Theo Galanakis
Title: RE: [SQL] C function extending postgres Thanks for your feedback. I'm actually trying to use a system metrics library from http://www-usr.inf.ufsm.br/~veiga/liblproc/index-en.html I have tried to link the library however I'm still getting the same message. cc -g -I /usr/local/pgsq

[SQL] C function extending postgres

2005-03-21 Thread Theo Galanakis
Title: C function extending postgres #include "postgres.h" #include "fmgr.h" #include "proc.h" PG_FUNCTION_INFO_V1(get_process_total); Datum get_process_total(PG_FUNCTION_ARGS) {     float ret;     ret = proc_cpu_user() + proc_cpu_nice() + proc_cpu_system() - proc_cpu_idle();  

Re: [SQL] Process priority.

2005-03-17 Thread Theo Galanakis
nkyou for your feedback. Theo -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED]] Sent: Friday, 18 March 2005 11:06 AM To: Theo Galanakis Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Process priority. Theo Galanakis <[EMAIL PROTECTED]> writes: >   I wrote a C pr

[SQL] Process priority.

2005-03-17 Thread Theo Galanakis
Title: Process priority. Hi,     I wrote a C program that can be called through postgres via stored procedures. It allows you to change the current postmaster process priority.     Essentially it's intended purpose would be to allow a highly resource intensive postmaster process to ru

[SQL] crosstab

2005-03-01 Thread Theo Galanakis
Title: crosstab Hi I have looked into the tablefunc / crosstab contrib for postgres and it appears like it can't perform what I need. The crosstab function converts this :     row_name    cat    value     --+---+---   row1  cat1    val1

Re: [SQL] Working with XML.

2005-02-23 Thread Theo Galanakis
about its inner workings.  Just out of curiosity, what is the size of Sort_Mem in your postgresql.conf?   Regards, George - Original Message ----- From: Theo Galanakis To: 'George Weaver' Cc: 'pgsql-sql@postgresql.org' Sent: Tuesda

Re: [SQL] Working with XML.

2005-02-22 Thread Theo Galanakis
all the rows and pasted them to the end so that I would have 100 rows, and the query worked as expected.   Perhaps the client you're using is causing the problem.  Can you run the query in pgAdmin?   Regards, George - Original Message - From:

FW: [SQL] Working with XML.

2005-02-20 Thread Theo Galanakis
  libxml2-devel-2.5.10-1.rpm   What am I doing wrong, or can someone point me to the direction of a binary for XML2 on RedHat ES3, Postgres 7.4.5.   Cheers,        Theo       -Original Message-From: Theo Galanakis Sent: Monday, 21 February 2005 11:52 AMTo:   Subject: FW: [SQL] Wo

FW: [SQL] Working with XML.

2005-02-20 Thread Theo Galanakis
14 16:13:18''}2d4mat2Lptmdydtgqnc5vnuzxgqxiykqn1c4pr0oduk5gwz25b3Lq05dzqxetee9om45b69ytb48uvziL5xrvyu4k7ng4oouihx0764929641215{ts ''2005-02-14 16:13:18''}1z5x6dLc9n1vtcLbmk7q6hdriqLa2ub4et41podr7izcro4nkkLsvp9p0s7obzr27txvknn92m0ps4riqqx7puqoLn2wpmm2z50r'jan28

Re: [SQL] Working with XML.

2005-02-14 Thread Theo Galanakis
vyu4k7ng4oouihx0764929641215{ts ''2005-02-14 16:13:18''}1z5x6dLc9n1vtcLbmk7q6hdriqLa2ub4et41podr7izcro4nkkLsvp9p0s7obzr27txvknn92m0ps4riqqx7puqoLn2wpmm2z50r','//query/@rows','','') Theo   -Original Message-From: George Weaver [mailto:[EMAIL PROTECTED] Sent: Tuesday, 15 February 2005 12:39 AMTo: Theo Galanakis; p

[SQL] Working with XML.

2005-02-13 Thread Theo Galanakis
Title: Working with XML. Hi Folks, Is there a way to pass in an xml string into a stored proc and thenplace this into a temp table? I use to be able to do this in sql server, it was quite handy as I could call one stored proc to update multiple records, here is a sample in sql server: se

[SQL] XML

2005-02-13 Thread Theo Galanakis
Title: XML I need help in getting the xml contribution installed. I have installed the contrib package for Postgres 7.4.5 and would appreciate any guidance as to how I get this working? Theo __ This email, including attac

Re: [SQL] pgmirror

2005-01-16 Thread Theo Galanakis
Title: RE: [SQL] pgmirror Thanks for your response, however can you please translate, my Greek is not the best. -Original Message- From: Achilleus Mantzios [mailto:[EMAIL PROTECTED]] Sent: Friday, 14 January 2005 6:57 PM To: Theo Galanakis Subject: Re: [SQL] pgmirror O Theo

[SQL] pgmirror

2005-01-13 Thread Theo Galanakis
Title: pgmirror Hi,     I need some help getting dbMirror working. I have installed the contrib RPM package for Redhat Linux. However it hasn't copied all the necessary files for dbMirror. I could only find pending.so.     I have tried coping the other files from :  http://develop

Re: [SQL] diff databases

2004-12-20 Thread Theo Galanakis
--- Begin Message --- EMS has a tool called EMS PostgreSQL Database Comparer. http://www.sqlmanager.net/products/postgresql/dbcomparer -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, 19 December 2004 1:23 AM To: [EMAIL PROTECTED] Subject: [SQL] diff dat

Re: [SQL] Export tab delimited from mysql to postgres.

2004-10-12 Thread Theo Galanakis
ts in this case 2 elements, if this was not the case replace the \r\n with \r. Theo -Original Message- From: Harald Fuchs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 13 October 2004 1:38 AM To: Theo Galanakis Subject: Re: Export tab delimited from mysql to postgres. >     Could

Re: [SQL] Export tab delimited from mysql to postgres.

2004-10-11 Thread Theo Galanakis
delimited from mysql to postgres. Quoth [EMAIL PROTECTED] (Theo Galanakis): >     Could you provide a example of how to do this? > >     I actually ended up exporting the data as Insert statements, > which strips out cf/lf within varchars. However it takes an eternity > to

Re: [SQL] Export tab delimited from mysql to postgres.

2004-10-11 Thread Theo Galanakis
hours infact Is this normal? Theo -Original Message- From: Harald Fuchs [mailto:[EMAIL PROTECTED]] Sent: Monday, 11 October 2004 7:34 PM To: [EMAIL PROTECTED] Subject: Re: [SQL] Export tab delimited from mysql to postgres. In article <[EMAIL PROTECTED]>, Theo Galanakis &

[SQL] Export tab delimited from mysql to postgres.

2004-10-10 Thread Theo Galanakis
Title: Export tab delimited from mysql to postgres. Has anyone been able to export and import a tab delimited file from mysql to postgres successfully? This is my dilemma which I have posted on mysql sites with no response, however postgres users may have come across the same issue: Trying to

Re: [SQL] Regex

2004-10-05 Thread Theo Galanakis
ng #indexname# on #table_name#     obtaining the #table_name#     Being : nodes, node_names Theo -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 6 October 2004 1:36 PM To: Theo Galanakis Cc: [EMAIL PROTECTED] Org Subject: Re: [SQL] Regex Theo Galanak

[SQL] Regex

2004-10-05 Thread Theo Galanakis
Title: Regex I know this is not a regex forum, however I had great assistance last time and thought I would ask, since the regex is looking through an SQL statement. I was trying to parse a SQL statement and get all the tables used. I'm actually doing this in Cold Fusion. I have gone as far

Re: [SQL] Isnumeric function?

2004-09-09 Thread Theo Galanakis
use that Index.. CREATE INDEX idx_content_numeric ON botched_table(content) WHERE content ~ '^[0-9]{1,9}$'; select * from botched_table where content = 200::integer Theo -Original Message- From: Josh Berkus [mailto:[EMAIL PROTECTED]] Sent: Friday, 10 September 2004 4:46 A

Re: [SQL] Isnumeric function?

2004-09-09 Thread Theo Galanakis
From: Jeff Eckermann [mailto:[EMAIL PROTECTED]] Sent: Friday, 10 September 2004 12:02 AM To: Thomas Swan; [EMAIL PROTECTED] Cc: Josh Berkus; Theo Galanakis; [EMAIL PROTECTED] Subject: Re: [SQL] Isnumeric function? Ok, how about this.  At least it works in my testing. I have extended it to al

[SQL]

2004-09-09 Thread Theo Galanakis
How do you get FTP access to http://developer.postgresql.org/docs/pgsql/contrib/ ftp://developer.postgresql.org/docs/pgsql/contrib/ Asks for a username and password, tried annonymous. Theo __This email, including

[SQL] Query Plan

2004-09-08 Thread Theo Galanakis
Title: Query Plan Have a question regarding when a Query Plan uses an Index. I have a basic statement This query uses the Index Scan: explain analyse select * from tablea where columna_id < 57 This query uses Seq Scan: explain analyse select * from tablea where columna_id < 58 There a

Re: [SQL] Isnumeric function?

2004-09-08 Thread Theo Galanakis
[mailto:[EMAIL PROTECTED]] Sent: Thursday, 9 September 2004 9:57 AM To: Theo Galanakis Cc: [EMAIL PROTECTED] Subject: Re: [SQL] Isnumeric function? Theo Galanakis <[EMAIL PROTECTED]> writes: > So I came up with the following. A Insert/update trigger would call a > procedure to check t

Re: [SQL] Isnumeric function?

2004-09-08 Thread Theo Galanakis
Title: RE: [SQL] Isnumeric function? Thankyou all for your feedback. I actually only want to check for whole numbers, so the ~ '^[0-9]+$' _expression_ is good. The issue really is that our CMS system sometimes holds the value of primary keys within a "content" varchar column(don't ask!), whic

[SQL] Isnumeric function?

2004-09-06 Thread Theo Galanakis
Title: Isnumeric function? How could you determine if a value being inserted into a varchar column is numeric? I was thinking of using a Regular _expression_ to find this, something like .. Where content ~* '^[0-9]{1,10}' There must be an easier way like a isNumeric() function? Theo

[SQL] Function Issue!

2004-08-18 Thread Theo Galanakis
Title: Function Issue! Can anyone tell me what is wrong with the function below ? It throws an ERROR:  syntax error at or near "FETCH" at character 551 CREATE OR REPLACE FUNCTION "public"."theo_test2" () RETURNS OPAQUE AS' BEGIN    declare curr_theo cursor for select * from node_names;    f

Re: [SQL]

2004-08-18 Thread Theo Galanakis
ent: Wednesday, 18 August 2004 3:44 PM To: Theo Galanakis Subject: Re: [SQL] O kyrios Theo Galanakis egrapse stis Aug 18, 2004 : > > Im running/playing with PG 8.0 locally and want to install the > contrib/dblink and contrib/crosstab. Can this be done on Windows, is > there a GMAKE.

[SQL]

2004-08-17 Thread Theo Galanakis
Im running/playing with PG 8.0 locally and want to install the contrib/dblink and contrib/crosstab. Can this be done on Windows, is there a GMAKE.exe for Windows?? Someone enlighten me! __This email, including attachments,

Re: [SQL] CROSS-TAB query help? I have read it cant be done in on

2004-08-16 Thread Theo Galanakis
]] Sent: Monday, 16 August 2004 6:06 PM To: Theo Galanakis Cc: '[EMAIL PROTECTED]' Subject: Re: [SQL] CROSS-TAB query help? I have read it cant be done in one SQL, pro ve them wrong! Theo Galanakis wrote: > Does anyone know how to perform a cross-tab query in ONE SQL without > h

[SQL] CROSS-TAB query help? I have read it cant be done in one SQL, pro ve them wrong!

2004-08-15 Thread Theo Galanakis
Title: CROSS-TAB query help? I have read it cant be done in one SQL, prove them wrong! Does anyone know how to perform a cross-tab query in ONE SQL without having to write a SP? The SQL at the end of this email attempts to display the subquery result-set in a cross-tab format, it does not grou

[SQL] Inserting into point[] type.

2004-08-12 Thread Theo Galanakis
Title: Inserting into point[] type. How do you insert into a column of type point[] Sample table: CREATE TABLE public.test (   Column_a varchar(1000),   Column_b point[] ) WITHOUT OIDS; I have tried without success: insert into test (Column_a, Column_b) values ('Aargau','{47.38389

Re: [SQL] ERROR: Cross-database references are not implemented -

2004-08-10 Thread Theo Galanakis
2004 1:35 PM To: Theo Galanakis Cc: [EMAIL PROTECTED] Subject: Re: [SQL] ERROR: Cross-database references are not implemented Theo Galanakis wrote: > How do I explicidly create a cross-database reference? > > Mind you these databases are on the same server. > > In MSSQL you could

[SQL] ERROR: Cross-database references are not implemented

2004-08-10 Thread Theo Galanakis
Title: ERROR: Cross-database references are not implemented How do I explicidly create a cross-database reference? Mind you these databases are on the same server. In MSSQL you could do that through enterprise manager. Any help would be appreciated. __