Re: [SQL] Object description at Client Window

2003-10-16 Thread Jordan S. Jones
give psql -E a try.. It will display any internal SQL commands that it uses. Jordan S. Jones Kumar wrote: Dear Friends,   I am working with Postgres 7.3.4 on RH linux 7.2.   I could get into the command prompt to describe a table structure.   Welcome to psql, the Postg

[SQL] Object description at Client Window

2003-10-16 Thread Kumar
Dear Friends,   I am working with Postgres 7.3.4 on RH linux 7.2.   I could get into the command prompt to describe a table structure.   Welcome to psql, the PostgreSQL interactive terminal.   Type:  \copyright for distribution terms   \h for help with SQL commands   \? for help on i

Re: [SQL] Calc

2003-10-16 Thread Muhyiddin A.M Hayat
> > trx_date | trx_time | descriptions| > > payment_method | debet | credit | creator > > +--+--+ > >- ---+---+--+- > > 2003-10-09 | 21:55:02 | Resto Biling : 13,800, Paid : 10,00

Re: [SQL] Postgres with OpenSSL

2003-10-16 Thread Jordan S. Jones
And http://www.postgresql.org/docs/7.3/static/client-authentication.html Jordan Jordan S. Jones wrote: http://www.postgresql.org/docs/7.3/static/ssl-tcp.html Jordan S. Jones -- I am nothing but a poor boy. Please Donate.. https://www.paypal.com/xclick/business=list%40racistnames.com&no_note=1&t

Re: [SQL] Postgres with OpenSSL

2003-10-16 Thread Jordan S. Jones
http://www.postgresql.org/docs/7.3/static/ssl-tcp.html Jordan S. Jones -- I am nothing but a poor boy. Please Donate.. https://www.paypal.com/xclick/business=list%40racistnames.com&no_note=1&tax=0¤cy_code=USD 2000info wrote: Hello, peopleware !!! I need to use Postgres with OpenSSL. The MySq

Re: [SQL] Can't convert numeric to_char() in catenate function

2003-10-16 Thread Yusuf
I 'must' quote the quotes. I 'must' quote the quotes. I 'must' quote the quotes. I 'must' quote the quotes. I 'must' quote the quotes. I 'must' quote the quotes. I 'must' quote the quotes. DANG!! I ''must'' quote the quotes. I ''must'' quote the quotes. I ''must'' quote the quotes. I ''must''

[SQL] Postgres with OpenSSL

2003-10-16 Thread 2000info
Hello, peopleware !!!     I need to use Postgres with OpenSSL. The MySql have many options of Docs for this. Where is the options Docs for the Postgres with OpenSSL ?   Thanks !!!   SPS 2000info  

Re: [SQL] Can't convert numeric to_char() in catenate function

2003-10-16 Thread Josh Berkus
Yusuf, > CREATE OR REPLACE FUNCTION "verticat" (text, numeric) RETURNS text AS ' > SELECT CASE WHEN $2 IS NULL THEN $1 > WHEN $1 IS NULL OR $1 = > THEN to_char($2,'9D99') > ELSE $1 || '', '' || to_char($2,'D99') You need to escape your s

[SQL] Can't convert numeric to_char() in catenate function

2003-10-16 Thread Yusuf
Hi there. Im trying to do the usual row catenation function, but for a "numeric" type column. I have this: CREATE OR REPLACE FUNCTION "verticat" (text, numeric) RETURNS text AS ' SELECT CASE WHEN $2 IS NULL THEN $1 WHEN $1 IS NULL OR $1 = THEN to_char($2,'

Re: [SQL] Calc

2003-10-16 Thread Steve Crawford
On Thursday 16 October 2003 10:37 am, Muhyiddin A.M Hayat wrote: > > Something like this: > > > > select id,db,cr,(select sum(cr-db) from calc sub where sub.id <= > > calc.id) from calc; > > > > This of course assumes that ID indicates the correct order of the > > entries and it will blow up if you

Re: [SQL] Calc

2003-10-16 Thread Muhyiddin A.M Hayat
> Something like this: > > select id,db,cr,(select sum(cr-db) from calc sub where sub.id <= > calc.id) from calc; > > This of course assumes that ID indicates the correct order of the > entries and it will blow up if you allow nulls for cr or db (which > you shouldn't since that would literally be

Re: [SQL] indexing timestamp fields

2003-10-16 Thread Bruno Wolff III
On Wed, Oct 15, 2003 at 21:25:17 +0100, teknokrat <[EMAIL PROTECTED]> wrote: > > I have a lot of queries of the " where timestamp < some date " type and > was wondering if an index would improve performance. None of the > timestamps are null and they are always populated Unless that query ret

Re: [SQL] Sorting problem

2003-10-16 Thread R. van Twisk
I think what you actually want is natural sorting. Ries > -Oorspronkelijk bericht- > Van: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Jean-Luc Lachance > Verzonden: woensdag 15 oktober 2003 17:43 > Aan: George A.J > CC: [EMAIL PROTECTED] > Onderwerp: Re: [SQL] Sorting problem > > > Yo

[SQL] indexing timestamp fields

2003-10-16 Thread teknokrat
Is it a good idea to index timestamp fields? what about date fields in general? thanks ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [SQL] indexing timestamp fields

2003-10-16 Thread teknokrat
Christopher Browne wrote: teknokrat <[EMAIL PROTECTED]> writes: Is it a good idea to index timestamp fields? what about date fields in general? If you need to order by a timestamp, then it can be worthwhile. If that timestamp can be null, and is rarely populated, then you might get a _big_ ben

Re: [SQL] [GENERAL] Alias-Error

2003-10-16 Thread Tom Lane
Jost Richstein <[EMAIL PROTECTED]> writes: > I am running a query with alias (a self join) against > version 7.3.4 on Suse Linux 7.3 and on FreeBSD (v5?). > It runs fine on Linux, but produces an error on > FreeBSD: "unknown alias C2". The string "unknown alias" appears nowhere in the 7.3 sources.

Re: [SQL] SQL function to validate money input

2003-10-16 Thread Richard Huxton
On Wednesday 15 October 2003 22:46, Zhao, Scott wrote: > Hi All, > > Is there a function available to validate if the input is a correct > money format? For exapmle, "23.56" is a correct number but "23.567" is > incorrect. I just like to do this in postgres level not in my > application code. Well