Re: [SQL] [GENERAL] MD5() function not available ??

2003-09-13 Thread Dennis Bjorklund
On Thu, 11 Sep 2003, Marek Lewczuk wrote: > I've searched for MD5 crypting function in PG, but I did not find it. > Anyone knows how to implement this function in PG ? It's implemented in the pgcrypto module that is in contrib in the tarball. Once you have added that you can for example do denn

Re: [SQL] Use derived expression in select statement

2003-09-13 Thread Tom Lane
"Richard Sydney-Smith" <[EMAIL PROTECTED]> writes: > select dy_c , dy_sect as tsect, (cy_bfwd + dy_p1T4) as curr_bal from fclitot > where dy_yr = 0 and (curr_bal) <-0.005 > In postgres it tells me curr_bal is not found. As it should --- this is completely illegal according to the SQL standard. I

[SQL] Use derived expression in select statement

2003-09-13 Thread Richard Sydney-Smith
I am converting a database from Sybase and have found the following command does not work in the same fashion. select dy_c , dy_sect as tsect, (cy_bfwd + dy_p1T4) as curr_bal from fclitot where dy_yr = 0 and (curr_bal) <-0.005 In the actual command used curr_bal is calculated from a very much lon

[SQL] A generic trigger?

2003-09-13 Thread ow
Hi, Am looking for a way to minimize the amount of fuctions that support triggers. E.g., there's "company" and "company_backup" tables. Update trigger on the "company" table will put a record in the "company_backup" table whenever "company" record is updated. The problem is that there's quite a f

Re: [SQL] createlang plpgsql failing on redhatlinux7.2

2003-09-13 Thread Robert Treat
On Friday 12 September 2003 12:18, Richard Huxton wrote: > On Friday 12 September 2003 16:49, Robert Treat wrote: > > rather do an rpm -qa | grep post to see if postgresql-pl-7.3.4-2PGDG is > > installed, it is the rpm for procedural languages in 7.3.* and didn't > > exist in the 7.2.* rpmset. > >

Re: [SQL] production parameters

2003-09-13 Thread Gregory S. Williamson
You might find some things of use in these: Greg W. DBA GLobeXplorer LLC -Original Message- From: chester c young [mailto:[EMAIL PROTECTED] Sent:

Re: [SQL] Q: insert/update in same statement

2003-09-13 Thread Bruno Wolff III
On Fri, Sep 12, 2003 at 10:55:17 -0700, "G. Ralph Kuntz, MD" <[EMAIL PROTECTED]> wrote: > Is it possible to make a single SQL statement that will insert a row > if it does not already exist, otherwise it will just update the > fields? No. > Actually, just a statement that will not give an error

[SQL] sorting

2003-09-13 Thread chester c young
how do you set sorting for indicies and order by? is it set once for the database, or can it be set per index? __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ---(end of broadc

Re: [SQL] Q: select query

2003-09-13 Thread Manfred Koizar
On 12 Sep 2003 10:58:45 -0700, [EMAIL PROTECTED] (G. Ralph Kuntz, MD) wrote: >I would like to select the second and subsequent rows where the first >column is the same: > > 1 b > 1 c > 3 f > >in other words, all but the first row of a group. all = SELECT * FROM t; but =

Re: [SQL] Q: select query

2003-09-13 Thread Rod Taylor
> in other words, all but the first row of a group. Interesting question. The below should work and be quick so long as there is a UNIQUE(col1, col2) constraint. SELECT col1 , col2 FROM j WHERE col2 != (SELECT col2 FROM j AS jsub WHERE col1 = j.col1

[SQL] production parameters

2003-09-13 Thread chester c young
What is the best source doc for postgresql setup in a production environment? I have read - giving it a big chuck of shmem - os not marking data files as accessed or modified but cannot find the doc. thanks, Chester __ Do you Yahoo!? Yahoo! SiteBuilder - Free, eas

[SQL] Q: select query

2003-09-13 Thread G. Ralph Kuntz, MD
I am trying to write a query to select some rows. My data consists of rows like this 1 a 1 b 1 c 2 d 3 e 3 f ... I would like to select the second and subsequent rows where the first column is the same: 1 b 1 c 3

[SQL] Q: insert/update in same statement

2003-09-13 Thread G. Ralph Kuntz, MD
Is it possible to make a single SQL statement that will insert a row if it does not already exist, otherwise it will just update the fields? Actually, just a statement that will not give an error about duplicate keys would be enough for my application. Something like INSERT INTO SOME_TABLE (FIEL

Re: [SQL] createlang problme

2003-09-13 Thread Tom Lane
"vijaykumar M" <[EMAIL PROTECTED]> writes: > i'm using RedhatLinux7.2, on top of this i upgrade the Postgres with V7.3.3. > After that, i tried to create a language with a createlang command. > ERROR: Load of file /usr/local/pgsql/lib/plpgsql.so failed: > /usr/local/pgsql/lib/plpgsql.so: un > def