Re: [SQL] Looking for comments

2001-01-02 Thread Peter Eisentraut
Thomas SMETS writes: snip ISBN's have a checkdigit; it would be sensible to provide a function to be used in a CHECK constraint to ensure that the ISBN is valid. /snip OK I'll start searching for it but haven't implemented yet In the PostgreSQL distribution there's a directory

[SQL] About Index

2001-01-02 Thread Najm Hashmi
Hi, I have created a table songs as follwoing: CREATE TABLE songs ( song_id serial NOT NULL, title character varying(50) NOT NULL, composer varchar(50), performer varchar(50), artist_id int4 not null, file_size int4, description text, extrInfo

[SQL] FUNCTION returing multiple rows

2001-01-02 Thread Brett Schwarz
I have seen in the postings that it is not possible to return multiple rows from a function. However, when I look at the programmers guide (Ch. 4), it almost leads me to believe otherwise: -8--- The following more interesting

Re: [SQL] Rules

2001-01-02 Thread Jan Wieck
Peeter Smitt wrote: Hi I'm trying to make updateable view useing rules. CREATE RULE update_rule AS ON UPDATE TO table DO INSTEAD SELECT fun1(new); Thing is that backend gives this error. ERROR: parser: parse error at or near ")" What i'm doing wrong? Are there any other ways to

Re: [SQL] Weird problem with script...

2001-01-02 Thread Tom Lane
[EMAIL PROTECTED] writes: I'm building a script to create the tables in my database. Everything works fine except one thing with this part of my script: create table tbl_resume_free_text_type ( type_id int, type text ); -- insert into tbl_resume_free_text_type

[SQL] order by day or month, etc

2001-01-02 Thread Leo Xavier
Hello first time I post something... good morning everyone! short presentation: Leo Xavier, Lisbon - Portugal, 17 years, my home-made site: www.megabenfica.com Sql7, win 2000... The question: How for example do I select all entrys from a certain month (of a certain year, of course) ? Or from a

Re: [SQL] FUNCTION returing multiple rows

2001-01-02 Thread Tom Lane
Brett Schwarz [EMAIL PROTECTED] writes: However, when I look at the programmers guide (Ch. 4), it almost leads me to believe otherwise: The following more interesting example takes a single argument of type EMP, and retrieves multiple results: select function hobbies (EMP) returns set of

Re: [SQL] order by day or month, etc

2001-01-02 Thread Jens Hartwig
Hello Leo, which version of PostgreSQL are you running? I tested: select to_char(abm_dat, 'DD/MM/') AS new_date from t_dummy; And it works fine: new_date 31/03/1992 15/06/1994 11/09/1993 19/11/1993 ... Regards, Jens Leo Xavier schrieb: [...] doing this: SELECT