[SQL] Outer Joins

2000-10-31 Thread Marc Rohloff
I've been looking at the open-source databases for a project I am working on and while reading about Postgres I saw that they do not support outer joins yet. I was intrigued by their solution of using a union query. Something Like: select a.col1, b.col2 from a,b where a.col1 = b.col2 union sele

[SQL] How To Increment A Field Value By Function

2000-10-31 Thread cn
Hello! I have read pgsql online docs but still need helps. (And pardon me for cross posting to pgsql-novice as I have not received responses to my problem.) I want to increment the value of field SocialSecurityNo in a centrally controlled table SocialSecurityTable. SocialSecurityTable contains

[SQL] Problem with coalesce..

2000-10-31 Thread George Henry C. Daswani
Hello,       Was wondering if such a call is unsupported, or a bug?   7.0.2 (postgresql, linux redhat 7.0)   SELECT COALESCE ((SELECT NULL,1)   returns a 1, correct..   however..   SELECT COALESCE ((SELECT CURVALUE FROM TABLEKEYS WHERE TABLENAME = 'BUYER'),1)   returns a "UNKNOWN expression t

RE: [SQL] INSERT [IGNORE] INTO TABLE

2000-10-31 Thread K Parker
>Not a good feature for me. Me neither, but... >Check existence and then insert or update. At least once a week I seem to be responding to this exact same suggestion. Somebody _please_ tell me if I'm the only one in the whole world who worries about race conditions? What's wrong with just m

Re: [SQL] INSERT [IGNORE] INTO TABLE

2000-10-31 Thread Najm Hashmi
Edmar Wiggers wrote: > > If I try to insert some row which in the table already exist the > > postgre don't insert it and tell some error. Everything ok. > > I'll insert only if there is not the same (same key) record, > > else don't insert and don't tell me errors about i

RE: [SQL] INSERT [IGNORE] INTO TABLE

2000-10-31 Thread Edmar Wiggers
> > Check existence and then insert or update. If you want, I guess > you could > > wrap that inside a stored procedure. > > > Well, that's a good idea :-) but I'm not sure about how to create > such procedure. I would appreciate Your help. Quite frankly, I'm not sure either. I'm just

RE: [SQL] INSERT [IGNORE] INTO TABLE

2000-10-31 Thread Petr Jezek
On Tue, 31 Oct 2000, Edmar Wiggers wrote: > > If I try to insert some row which in the table already exist the > > postgre don't insert it and tell some error. Everything ok. > > I'll insert only if there is not the same (same key) record, > > else don't insert and don't tell me e

RE: [SQL] INSERT [IGNORE] INTO TABLE

2000-10-31 Thread Edmar Wiggers
> If I try to insert some row which in the table already exist the > postgre don't insert it and tell some error. Everything ok. > I'll insert only if there is not the same (same key) record, > else don't insert and don't tell me errors about it. > In MySQL is a switc

Re: [SQL] Need info: pl/pgsql performance

2000-10-31 Thread Kovacs Zoltan Sandor
On Mon, 23 Oct 2000, najm Hashmi wrote: > Hi, I would to know if there is any articles or books that talk about > pl/pgsql performance especially versus C. Thanking you in advance for > your help. I can only say what the documentation says about it in the "Overview" section (please read it if

[SQL] INSERT [IGNORE] INTO TABLE

2000-10-31 Thread Petr Jezek
If I try to insert some row which in the table already exist the postgre don't insert it and tell some error. Everything ok. I'll insert only if there is not the same (same key) record, else don't insert and don't tell me errors about it. In MySQL is a swit

Re: [SQL] fetching rows

2000-10-31 Thread Decio Fonini
Hello, Nikolay, Don't use cursors; instead, use: " select * from films limit 25 offset 0 ; " and on the next query: " select * from films limit 50 offset 25 ; " and so on. You have to encode the current offset into the NEXT link, either making it into a button inside a form, with a hidden fie

[SQL] PLPGSQL examples

2000-10-31 Thread Kovacs Zoltan Sandor
Hi Najm, have you tried the test examples shipped in the tarball (src/pl/plpgsql/test)? In addition, you can find *lots* of examples (mostly with Hungarian comments) on ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz/Linux/PostgreSQL/strukturak/* PLPGSQL is one of the best things in PostgreSQ