[SQL] Table Design Questions

2003-01-10 Thread Chad L
Hello, I am trying to come up with an efficient table design that describes a fantasy character that meets the following criteria: * Character "attributes" may somewhat frequently be added and removed with time. (e.g.: I may decide later on to add a boolean attribute CanSwim, or remove it all tog

Re: [SQL] SQL function parse error ?

2003-01-10 Thread Radu-Adrian Popescu
Robert, my dear fellow... How about checking your facts before contradicting anyone ? Shame on you ! Have you actually tried to do a SELECT* from foo ? Pathetic ! Try it out, if that won't work on Oracle, MSSQL, PostgreSql I'll buy everyone on this list a chase of Crystal. Robert, even select

Re: [SQL] insert rule doesn't see id field

2003-01-10 Thread Radu-Adrian Popescu
To everyone interested, check out Tom Lane's and Bruce's comments on pgsql-hackers: http://archives.postgresql.org/pgsql-hackers/2003-01/msg00446.php There seems to be some consensus towards removing $ from the list of allowed operator characters. Regards, = Radu-Adrian Popescu CSA, DBA, Devel

Re: [SQL] insert rule doesn't see id field

2003-01-10 Thread Radu-Adrian Popescu
I'm extremely sorry about the post in this thread ! Had a brain cramp, my appologies. Should have been Re: [SQL] SQL function parse error. Terribly sorry again ! = Radu-Adrian Popescu CSA, DBA, Developer Aldratech Ltd. - Original Message - From: "Radu-Adrian Popescu" <[EMAIL PROTECTED]

Re: [SQL] SQL function parse error ?

2003-01-10 Thread Robert Treat
On Fri, 2003-01-10 at 04:13, Radu-Adrian Popescu wrote: > > Robert, my dear fellow... > > How about checking your facts before contradicting anyone ? Shame on you ! > Have you actually tried to do a SELECT* from foo ? Pathetic ! At least you started out all nice and flowery... > Try it out, if

Re: [SQL] SQL function parse error ?

2003-01-10 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > ... I still > would like to see answered is whether oracle or others support >$ as an > operator, or if the sql spec has anything to say on the matter. The SQL spec does not have the concept of user-definable operators at all, so it provides no useful gu

Re: [SQL] Table Design Questions

2003-01-10 Thread dev
> Hello, > > I am trying to come up with an efficient table design > that describes a fantasy character that meets the > following criteria: Apologies for only dealing with the last part of your query - busy at the moment. I'll try and follow up in more detail later. > CREATE TABLE ATTRIBUTES (

Re: [SQL] insert rule doesn't see id field

2003-01-10 Thread Ron Peterson
On Thu, Jan 09, 2003 at 11:53:42PM -0500, Tom Lane wrote: > Ron Peterson <[EMAIL PROTECTED]> writes: > > On Thu, Jan 09, 2003 at 04:50:56PM -0500, Ron Peterson wrote: > >> colindices = (int *) malloc (ncols * sizeof (int)); > > > Of course we should verify that malloc succeeded... > > Actually, t

Re: [SQL] Table Design Questions

2003-01-10 Thread Josh Berkus
Chad, > I am trying to come up with an efficient table design > that describes a fantasy character that meets the > following criteria: Believe it or not, this is the first "D&D" question I've seen on this list. > CREATE TABLE ATTRIBUTES ( > CHAR_ID INT PRIMARY KEY NOT NULL, > ATTR

Re: [SQL] noupcol code cleanup

2003-01-10 Thread Ron Peterson
Well, I went through this again myself, and fixed a lot of stuff. I'm going to drop this thread, but didn't want the last chunk of code I posted to be so crappy. This is what I have come up with, FWIW: #include "executor/spi.h" /* this is what you need to work with SPI */ #include "commands/

[SQL] function does not exist

2003-01-10 Thread Dave A.
I am using postgresql version 7.2.3, and have the following situation. When I attempt to add a function, I get the error CreateTrigger: function mem_leveled() does not exist. Using the function in psql (i.e. SELECT mem_leveled('fubar', 4, '2002/12/30 10:09:00 GMT'); ) works fine, I just can't cre

Re: [SQL] function does not exist

2003-01-10 Thread Ross J. Reedstrom
Quoting from http://www.postgresql.org/idocs/index.php?plpgsql-trigger.html : PL/pgSQL can be used to define trigger procedures. A trigger procedure is created with the CREATE FUNCTION command as a function with no arguments and a return type of OPAQUE. Note that the function must be

Re: [SQL] function does not exist

2003-01-10 Thread Josh Berkus
Dave, A trigger function does not take variable parameters, gets its data from the NEW or OLD records, and returns OPAQUE with the RETURN NEW statement. Please check out the documentation on writing PL/pgSQL triggers under Procedural Languages in the online docs. -Josh Berkus --