[SQL] create function

2001-04-09 Thread Tom Nohejl
How Can I Create function delete from... with returns opague and without plpgsql language. Sample: create function fdel returns opaque as 'delete from tab;' language 'sql'; Thanks. Tomas N.

[SQL] Re: open and closed paths ...

2001-04-09 Thread Hans-Jürgen Schönig
The only problem left is the correct syntax of the command when using []. I've tried some versions but it did not work. Maybe Tom can include an example into the docs. Hans shop=# INSERT INTO temppath(fieldname) VALUES '((1,3), (4,12))'; ERROR: parser: parse error at or near "'" shop=#

Re: [SQL] Casting numeric to text

2001-04-09 Thread Peter Eisentraut
Cedar Cox writes: When would one want to use cast()? What is the difference between cast and :: ? After a quick look in the documentation I couldn't find anything.. cast() is SQL, :: is traditional Postgres. :: may go away in the distant future to make room for the SQL feature that is

Re: [SQL] please help

2001-04-09 Thread Peter Eisentraut
Cedar Cox writes: It would be somewhat (very) useful to have something like this. We were toying with the idea of making some sort of system to figure out if a table is locked or not. This will probably introduce race conditions unless done very carefully. In theory you need a second level

Re: [SQL] Casting numeric to text

2001-04-09 Thread Ross J. Reedstrom
On Mon, Apr 09, 2001 at 05:57:45PM +0200, Peter Eisentraut wrote: Cedar Cox writes: When would one want to use cast()? What is the difference between cast and :: ? After a quick look in the documentation I couldn't find anything.. cast() is SQL, :: is traditional Postgres. :: may

Re: [SQL] Casting numeric to text

2001-04-09 Thread Peter Eisentraut
Ross J. Reedstrom writes: FYI, I can't find an occurance of '::' that's not part of '::=' in either SQL1992.txt or the ansi-iso-[sql]-1999.txt files I've got. SQL 1999 6.12 static method invocation ::= user-defined type double colon method name [ SQL argument list ] That syntax even

[SQL] Re: select substr???

2001-04-09 Thread Tim Johnson
Hi, I have postgres 6.x (where x is something). I have the following list of data data ABC* ABC ABC- ABC+ ABC QWE~ ASD+ ASD# KLASDHK- KLASDHK+ KLASDHK KLASDHK* what I want to do is 'select distinct(data) [ignoring non alphanumeric characters] order by data' is there a way to do

Re: [SQL] Casting numeric to text

2001-04-09 Thread Ross J. Reedstrom
On Mon, Apr 09, 2001 at 06:53:13PM +0200, Peter Eisentraut wrote: Ross J. Reedstrom writes: FYI, I can't find an occurance of '::' that's not part of '::=' in either SQL1992.txt or the ansi-iso-[sql]-1999.txt files I've got. SQL 1999 6.12 static method invocation ::=

Re: [SQL] Re: select substr???

2001-04-09 Thread Peter Eisentraut
Tim Johnson writes: Hi, I have postgres 6.x (where x is something). I have the following list of data data ABC* ABC ABC- ABC+ ABC QWE~ ASD+ ASD# KLASDHK- KLASDHK+ KLASDHK KLASDHK* what I want to do is 'select distinct(data) [ignoring non alphanumeric characters]

[SQL] Sorting and then...

2001-04-09 Thread Wei Weng
Suppose I have a table create table test ( id integer, name text ); And I want to get the names of the largest 10 "id"s. How can I do that in sql? Thanks! ---(end of broadcast)--- TIP 2: you can get off all lists at once with

[SQL] Inheritance Semantics

2001-04-09 Thread Mark Butler
Could someone (Chris Mead?) post an update on the status of fixing PostgreSQL's inheritance semantics in the following ways: Has a decision been made to implementing true inheritance via INHERITS or an alternative keyword? By true inheritance, I mean first and foremost that any query on a

Re: [SQL] Sorting and then...

2001-04-09 Thread Roberto Mello
On Mon, Apr 09, 2001 at 07:22:52PM -0400, Wei Weng wrote: And I want to get the names of the largest 10 "id"s. How can I do that in sql? What do you mean by "largest"? Largest id? "largest" text string? If it's the id you can do: select max(id) from table; -Roberto

Re: [SQL] Inheritance Semantics

2001-04-09 Thread Bruce Momjian
Could someone (Chris Mead?) post an update on the status of fixing PostgreSQL's inheritance semantics in the following ways: Has a decision been made to implementing true inheritance via INHERITS or an alternative keyword? By true inheritance, I mean first and foremost that any query on