[GENERAL] textsubstr() ...? for postgres 7 beta5
I have installed the beta 7 for postgres but... it seems to be missing some text functions ? l like the textsubstr ? Is this beacuse it is a "beta" and the final release will include these or are they forever droped ? Please let me know thank you nathan
[GENERAL] New eMail address
Hi folks, would anyone please update his aliases? My new email address is [EMAIL PROTECTED] I'll be able to read mail addressed to [EMAIL PROTECTED] until end of May. Mail reaching that address after May will probably get lost. Jan -- #==# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #== [EMAIL PROTECTED] #
[GENERAL] Re: [SQL] textsubstr() ...? for postgres 7 beta5
[EMAIL PROTECTED] writes: > I have installed the beta 7 for postgres but... it seems to be missing > some text functions ? l > like the textsubstr ? Huh? There is no function named textsubstr() in 6.5.*, either. Perhaps you had some locally user-defined functions you forgot to reinstall? regards, tom lane
[GENERAL] implementing refcounts across tables.
Think of this problem as handling unix style filesystem hardlinks. Consider two tables: create table link ( data_id int4, link_date timestamp ); create table data ( date_id int4 PRIMARY KEY, data_txt text ); We may have multiple "link" rows pointing at the same data. What I would like to implement is a rule that when a row is deleted from "link" then if no other rows in "link" reference a row in "data" then the row in data is deleted as well. Here's what I've tried: create rule cascade_clean_data as on delete to link do delete from data where data_id = OLD.data_id AND '1' = (select count(*) from link where data_id = OLD.data_id) ; I've also tried '0' for the second conditional, but niether seem to work. So, is there a way to accomplish this automatic refcounting either with rules or some other trick? Also, I think the count(*) is a bad idea because we only need to know if a single entry besideds the one we are deleteing exists, not the actual count. Any suggestions? thanks, -- -Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]] "I have the heart of a child; I keep it in a jar on my desk."
Re: [GENERAL] Re: [SQL] textsubstr() ...? for postgres 7 beta5
Tom Lane wrote: > [EMAIL PROTECTED] writes: > > I have installed the beta 7 for postgres but... it seems to be missing > > some text functions ? l > > > like the textsubstr ? > > Huh? There is no function named textsubstr() in 6.5.*, either. Perhaps > you had some locally user-defined functions you forgot to reinstall? > > regards, tom lane Opps... Ok, well I made a mistake it is not textsubstr() but this : (found in 6.5.2 redhat ) result |function |arguments |description +-+---+--- text|text_substr |text int4 int4 |return portion of string Is this in 7.0 ? (PS this is not user defined, well at least I did not make it ...? ) thank you nathan
Re: [HACKERS] Re: [GENERAL] Re: [SQL] textsubstr() ...? for postgres 7 beta5
[EMAIL PROTECTED] writes: > it is not textsubstr() but this : (found in 6.5.2 redhat ) > result |function |arguments |description > +-+---+-- > text|text_substr |text int4 int4 |return portion of string > Is this in 7.0 ? Looks like it's called just plain "substr" now. See http://www.postgresql.org/docs/postgres/functions.htm regards, tom lane