Re: [SQL] List Concatination

2001-03-16 Thread Josh Berkus

Richard,

> Sorry - issue was to do with the ordering of the concatenation, not
> the 
> user-defined aggregates (iirc - it's getting late here).
> 
> I do remember I got different orders when selecting and updating. In
> my 
> case it didn't matter, and I'm guessing if the order reverses in your
> case when 8.x is released it's not the end of the world either.

As I said in my previous e-mail, I appear to have gotten the list to
order itself by basing it on an (ordered) sub-select.  Since the DB is
only 50% populated right now, I'm not sure that's working perfectly but
I'll keep you posted.

> If
> you 
> were joining words in a sentence, obviously it would matter (unless
> you 
> were on usenet ;-)

illiterate posters newsgroup most calling you are?

-Josh Berkus


__AGLIO DATABASE SOLUTIONS___
   Josh Berkus
  Complete information technology  [EMAIL PROTECTED]
   and data management solutions   (415) 565-7293
  for law firms, small businessesfax 621-2533
and non-profit organizations.  San Francisco

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: [SQL] List Concatination

2001-03-16 Thread Josh Berkus

Tom,

> Yes, that oughta work fine to determine the order of inputs to the
> aggregate function.  ORDER BY in sub-selects is a new feature (heck,
> sub-selects in FROM at all is a new feature) in 7.1, so this trick
> wasn't available when Richard and I discussed the issue before.

Hey, why do you think that I was bugging you about 7.1 for months?  You
should see some of the things I do with sub-selects.   Err ...
programming-wise, that is ;-)

Speaking of which, when's the 7.1 release?

-Josh

__AGLIO DATABASE SOLUTIONS___
   Josh Berkus
  Complete information technology  [EMAIL PROTECTED]
   and data management solutions   (415) 565-7293
  for law firms, small businessesfax 621-2533
and non-profit organizations.  San Francisco

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



[SQL] SQL3 support

2001-03-16 Thread Mourad EL HADJ MIMOUNE



Hello,
I would know if Postgres support SQL3 language. in 
other word, does the pgsql conforme with sql3.
if yes wich version support this.
thank you.


[SQL] update table sequence

2001-03-16 Thread Egbert Ellenkamp

All,

Is there a way I can set the sequence of a table equal to highest row
ID?
For example something like:
select setval('mytable_myrowid_seq',select max(myrowid) from mytable);

I read the documentation but could not find anything relevant.

Thanks in advance,

Egbert.

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [SQL] List Concatination

2001-03-16 Thread Tom Lane

"Josh Berkus" <[EMAIL PROTECTED]> writes:
> As I said in my previous e-mail, I appear to have gotten the list to
> order itself by basing it on an (ordered) sub-select.  Since the DB is
> only 50% populated right now, I'm not sure that's working perfectly but
> I'll keep you posted.

Yes, that oughta work fine to determine the order of inputs to the
aggregate function.  ORDER BY in sub-selects is a new feature (heck,
sub-selects in FROM at all is a new feature) in 7.1, so this trick
wasn't available when Richard and I discussed the issue before.

regards, tom lane

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: [SQL] update table sequence

2001-03-16 Thread Ross J. Reedstrom

On Fri, Mar 16, 2001 at 12:15:28PM +, Egbert Ellenkamp wrote:
> All,
> 
> Is there a way I can set the sequence of a table equal to highest row
> ID?
> For example something like:
> select setval('mytable_myrowid_seq',select max(myrowid) from mytable);

So close!

select setval('mytable_myrowid_seq',max(myrowid)) from mytable;

Ross

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[SQL] Oracle to PostgreSQL help: What is (+) in Oracle select?

2001-03-16 Thread Christopher Audley

I'm trying to modify an application which runs on Oracle to run against 
PostgreSQL.  I'm currently stuck on a query that I can't recognize, it 
doesn't look like standard SQL.

A select is done across two tables, however when joining the foreign 
key, the right hand side of the equallity has (+) appended

SELECT o.* from one o, two t where o.key = t.key(+)

Does anyone know what this does and how I can reproduce the select in 
PostgreSQL?

Thanks
Chris


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[SQL] RE: Oracle to PostgreSQL help: What is (+) in Oracle select?

2001-03-16 Thread Michael Davis

This is Oracle's syntax for an outer join.  Try this in PostgreSQL

SELECT o.* from one o LEFT JOIN two t ON o.key = t.key;

-Original Message-
From:   Christopher Audley [SMTP:[EMAIL PROTECTED]]
Sent:   Friday, March 16, 2001 3:57 PM
To: [EMAIL PROTECTED]
Subject:Oracle to PostgreSQL help:  What is (+) in Oracle select?

I'm trying to modify an application which runs on Oracle to run against 
PostgreSQL.  I'm currently stuck on a query that I can't recognize, it 
doesn't look like standard SQL.

A select is done across two tables, however when joining the foreign 
key, the right hand side of the equallity has (+) appended

SELECT o.* from one o, two t where o.key = t.key(+)

Does anyone know what this does and how I can reproduce the select in 
PostgreSQL?

Thanks
Chris


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [SQL] Oracle to PostgreSQL help: What is (+) in Oracle select?

2001-03-16 Thread Joe Conway

> A select is done across two tables, however when joining the foreign
> key, the right hand side of the equallity has (+) appended
>
> SELECT o.* from one o, two t where o.key = t.key(+)
>
> Does anyone know what this does and how I can reproduce the select in
> PostgreSQL?

Hi Chris,

The (+) in Oracle is for an outer join. See
http://www.postgresql.org/devel-corner/docs/postgres/sql-select.html , in
the join-type description, left outer join. Outer joins are only available
in PostgreSQL 7.1, which is currently in the late stages of beta testing.

Hope this helps,

Joe



---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: [SQL] Oracle to PostgreSQL help: What is (+) in Oracle select?

2001-03-16 Thread Richard Poole

On Fri, Mar 16, 2001 at 05:57:14PM -0500, Christopher Audley wrote:
> I'm trying to modify an application which runs on Oracle to run against 
> PostgreSQL.  I'm currently stuck on a query that I can't recognize, it 
> doesn't look like standard SQL.
> 
> A select is done across two tables, however when joining the foreign 
> key, the right hand side of the equallity has (+) appended
> 
> SELECT o.* from one o, two t where o.key = t.key(+)
> 
> Does anyone know what this does and how I can reproduce the select in 
> PostgreSQL?

It's an outer join. In Postgres it'd be

SELECT o.* from one left outer join two using ( key )

but it's new in 7.1 .

Richard

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly