Re: [SQL] How to represent a tree-structure in a relational database

2000-12-15 Thread Tulassay Zsolt
On Thu, 14 Dec 2000, Tulassay Zsolt wrote: > > You can find the article dealing with this at > http://www.utdt.edu/~mig/sql-trees > sorry i pasted in the wrong url (this was mentioned in an earlier post) the correct one is: A look at SQL Trees (by Joe Celko) http://www.dbmsmag.com/9603d06.h

[SQL] to_timestamp, problem

2000-12-15 Thread Marcin Mazurek
Hi, Can anyone explain to me why this doesn't work. Seems to be some stupid (my) mistake: mtldb=# SELECT to_timestamp('05121445482000', 'MMDDHHMISS'); to_timestamp 2000-05-12 14:45:48+02 (1 row) mtldb=# SELECT to_timestamp('2512144548', 'MMDDHHMISS')

Re: [SQL] to_timestamp, problem

2000-12-15 Thread Karel Zak
On Fri, 15 Dec 2000, Marcin Mazurek wrote: > Hi, > Can anyone explain to me why this doesn't work. Seems to be some stupid (my) > mistake: > > mtldb=# SELECT to_timestamp('05121445482000', 'MMDDHHMISS'); > to_timestamp > > 2000-05-12 14:45:48+02 > (1 row) >

Re: [SQL] How to represent a tree-structure in a relationaldatabase

2000-12-15 Thread miguel sofer
> > I once started writing a small paper on this subject; it is still in a > > rather preliminary state. > > > > You can download the draft (and some ill documented code, 53kB) from > > http://www.utdt.edu/~mig/sql-trees > ah, this looks very, very nice! Thanks. > on page 5ff you describe th

[SQL] Confused by timezones

2000-12-15 Thread Alessio Bragadini
Sorry, I am trying to find my way in formatting timestamps for different timezones and I am a little confused. [ PostgreSQL 7.0.0 on alphaev6-dec-osf4.0f, compiled by cc ] Let's imagine CREATE TABLE tztest (id SERIAL, v TEXT, ts TIMESTAMP DEFAULT now()); How can I format a SELECT to_char(ts,'

Re: [SQL] Confused by timezones

2000-12-15 Thread Karel Zak
On Fri, 15 Dec 2000, Alessio Bragadini wrote: > Sorry, I am trying to find my way in formatting timestamps for different > timezones and I am a little confused. > > [ PostgreSQL 7.0.0 on alphaev6-dec-osf4.0f, compiled by cc ] > > Let's imagine > CREATE TABLE tztest (id SERIAL, v TEXT, ts TIMES

Re: [SQL] Confused by timezones

2000-12-15 Thread Alessio Bragadini
Karel Zak wrote: > Yes it's possible, but in freezed 7.1 *only*. It's 'TZ' and output is Thanks, on my experimental 7.1 works perfectly, another reason to switch as soon as possible. :-) > You must use same names (definitions) as are used in your OS > (an example on Linux at /usr/share/zonein

[SQL] readline ??

2000-12-15 Thread vs
Hope my message doesn't bother you. I want to use readline with pgsql7.02 on mandrake 7.2. LM7.2 installed both packages, readline/devel & postgres. How to make psql know about readline? Thanks Lucian

Re: [Re: [SQL] postgres]

2000-12-15 Thread Marc Daoust
Thank you very much Reberto, It appears that your co-workers are not inerested in potential funding. For the rude onesmaybe/perhaps people like myself were givin the email address ever think of that. A potential client that is having second thoughts. Roberto Mello <[EMAIL PROTECTED]> wro

Re: [SQL] Confused by timezones

2000-12-15 Thread Tom Lane
Alessio Bragadini <[EMAIL PROTECTED]> writes: > village=# set TimeZone TO PST; I'm guessing that's not a legal timezone name on your platform. On my box I have to spell it "PST8PDT" ... note that the displayed abbreviation is not the same as the name used to set the timezone.

Re: [SQL] Confused by timezones

2000-12-15 Thread Tom Lane
Alessio Bragadini <[EMAIL PROTECTED]> writes: >> You must use same names (definitions) as are used in your OS >> (an example on Linux at /usr/share/zoneinfo) > In 7.1 works. Is it supposed to work also in 7.0? Yes; as far as I know this hasn't changed... regards, tom lan

Re: [Re: [SQL] postgres]

2000-12-15 Thread Stephan Szabo
On 14 Dec 2000, Marc Daoust wrote: > Thank you very much Reberto, > > It appears that your co-workers are not inerested in potential funding. > For the rude onesmaybe/perhaps people like myself were givin the email > address ever think of that. > > A potential client that is having second t

Re: [SQL] postgres

2000-12-15 Thread Bruce Momjian
> On Wed, Dec 13, 2000 at 04:44:55PM -0800, Josh Berkus wrote: > > Mr. Daoust, > > > > You have reached the PostgreSQL SQL developers mailing list. We are > > not PostgreSQL sales people, and we have no marketing information to > > sell you. Please have a clue. > > Errr... forgive me

Re: [SQL] readline ??

2000-12-15 Thread Brett W. McCoy
On Fri, 15 Dec 2000, vs wrote: > Hope my message doesn't bother you. > I want to use readline with pgsql7.02 on mandrake 7.2. > LM7.2 installed both packages, readline/devel & postgres. > How to make psql know about readline? If you are using a binary installation of Postgres (you installed via

[SQL] Re: full text index

2000-12-15 Thread Artur Rataj
On Fri, 15 Dec 2000, Artur Rataj wrote: > Hello, > > I have a question about a full text index. > I have created such index over a text field. I have stored > substrings of each word in the text field, so that for `example' they > would be `example', `xample' and so on to `le'. The index has be

Re: [Re: [SQL] postgres]

2000-12-15 Thread Bruce Momjian
If the person really does want commercial support, there is a "Commercial Support" page on www.postgresql.org. > Thank you very much Reberto, > > It appears that your co-workers are not inerested in potential funding. > For the rude onesmaybe/perhaps people like myself were givin the email

[SQL] full text index

2000-12-15 Thread Artur Rataj
Hello, I have a question about a full text index. I have created such index over a text field. I have stored substrings of each word in the text field, so that for `example' they would be `example', `xample' and so on to `le'. The index has been physically ordered by string, indices were created

[SQL] Use of indexes in plpgsql functions

2000-12-15 Thread Graham Vickrage
> I have a table with 650k rows with an index on URL (pg v7.0.0 on > i686-pc-linux-gnu) > > When using psql the select query behaves as expected i.e. takes < 1 second > (and explain tells me it is using the correct index) > > However when I put this into a pl function it takes about 2.5 mins, H

Re: [SQL] Use of indexes in plpgsql functions

2000-12-15 Thread Tom Lane
"Graham Vickrage" <[EMAIL PROTECTED]> writes: >> CREATE FUNCTION get_url_hits (varchar, int4) RETURNS int4 AS ' >> DECLARE >> num INT4; >> BEGIN >> SELECT count(*) INTO num FROM statistics WHERE url = $1 and >> website_id = $2; > [ is slow ] A possible gotcha is if the url and website_id column

Re: [SQL] How to represent a tree-structure in a relationaldatabase

2000-12-15 Thread Alvar Freude
Hi, miguel sofer wrote: > > Sorry, I never got around to completing this, or thinking any further. My > other files are definitely not in a usable state right now. I hope to be > able > to improve things over the (southern) summer holidays, so there may be > news > soon - but do not hold your br