[SQL] unsubscribe

2003-09-22 Thread Rudi Starcevic
unsubscribe ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] virus warning

2003-09-19 Thread Rudi Starcevic
Hi, Yeah me too - about 150 so far today. I was thinking it's from my Debian mailing lists not PostgreSQL. Strange people these stpid virus spammers. Good luck with it all. Regards Rudi. ---(end of broadcast)--- TIP 6: Have you searched our li

Re: [SQL] Linked Lists example.

2003-09-14 Thread Rudi Starcevic
ned off) and using the ionCube PHP Accelerator. The project this example is from is: http://www.phpblaze.org/ I'm not quite done with the initial version so I haven't finished the website yet. -Jesse Rudi Starcevic wrote: Jesse, Thanks - that's a good example. Could you als

Re: [SQL] Linked Lists example.

2003-09-14 Thread Rudi Starcevic
ion, but that's just a convenience thing basically. Makes it easier to move elements around and delete them etc... Let me know if I didn't explain this very well, I'd be happy to send you the actual database specs and some sample code. -Jesse Rudi Starcevic wrote: Hi, Can anyo

[SQL] Linked Lists example.

2003-09-14 Thread Rudi Starcevic
Hi, Can anyone give me a real world example of where a 'linked list' would be used in PostgreSQL or SQL in general. Just been reading up a little on them and am wondering how/when to use them. Many thanks Rudi. ---(end of broadcast)--- TIP 9: the p

[SQL] Data Warehousing

2003-07-16 Thread Rudi Starcevic
Hi, I'd like to learn about Data Warehousing - using PostgreSQL of course. I've been looking around for some good starting info. on this subject without a lot of joy so I'd like to ask if anyone could point me to a good starting off doco. or tutorial. I have found some data out there but what I

Re: [SQL] Logging select statements

2003-07-09 Thread Rudi Starcevic
arameter: > > SELECT * FROM get_rows_and_log( 'datatable WHERE somedata LIKE > ''%e''' ) AS data( id int, somedata varchar); > > Hope that is what you were after! > > Cheers > > Matthew. > > On Wednesday, July 9, 2003, at 04:55 PM,

Re: [SQL] Logging select statements

2003-07-09 Thread Rudi Starcevic
ge you could put in as ::text the numbers you want. > > For instance if the page is named foo.php, then > the facility would be foo.php-impression, > foo.php-click. > > So you only call a php function. > > On Wed, 9 Jul 2003, Rudi Starcevic wrote: > > > Thanks Achill

Re: [SQL] Logging select statements

2003-07-08 Thread Rudi Starcevic
specific project will go in the future. On Wed, 9 Jul 2003, Rudi Starcevic wrote: Hi, I have an application where user's can view records in a short form with their first select and view a long form with a second select. The first view I term an impression. The second view I term

[SQL] Logging select statements

2003-07-08 Thread Rudi Starcevic
Hi, I have an application where user's can view records in a short form with their first select and view a long form with a second select. The first view I term an impression. The second view I term a click. I'd like to log the impression's and click's. I'm wondering which is the most effiecient

[SQL] Break referential integrity.

2003-07-01 Thread Rudi Starcevic
Hi, I know that if you have a trigger and function then drop/replace the function the trigger needs to be drop/replaced too so that it can see the new function. Is it the same for Ref. Integ. on table's too ? If table B's foreign key references table A and you drop/replace table A then the refe

Re: [SQL] Bitwise operation

2003-06-30 Thread Rudi Starcevic
On Mon, Jun 30, 2003 at 22:28:15 +1000, Rudi Starcevic <[EMAIL PROTECTED]> wrote: Hi, I'm learning to use Postgresql's bitwise operator's as I'm interested in building super fast search's based on user selections in web forms. So far so good but I have

[SQL] Bitwise operation

2003-06-30 Thread Rudi Starcevic
Hi, I'm learning to use Postgresql's bitwise operator's as I'm interested in building super fast search's based on user selections in web forms. So far so good but I have just lost it a little so I thought I'd post. Please growl at me if I'm asking on the wrong list :-) I understand this: SELE

Re: [SQL] Database design - AGAIN

2003-06-24 Thread Rudi Starcevic
gt; On Monday 23 June 2003 22:19, Rudi Starcevic wrote: > > I"m not sure whether to have on larger table or 2 smaller one with a > > join table. > > Theory says you are better off with the join tables. Practical > reality agrees with this. It takes a bit more work to writ

[SQL] Database design - AGAIN

2003-06-23 Thread Rudi Starcevic
Hi, Sorry - I make some typo's - here is the question again. I have a Spread Sheet which I need to make a searchable directory out of. I'm in two minds on a couple things so I thought I'd ask. I"m not sure whether to have on larger table or 2 smaller one with a join table. This is a trim

[SQL] Database Design

2003-06-23 Thread Rudi Starcevic
Hi, I have a Spread Sheet which I need to make a searchable directory out of. I'm in two minds on a couple things so I thought I'd ask. I"m not sure whether to have on larger table or 2 smaller one with a join table. This is a trimmed down version of the data. The directory is of Camping grounds/

Re: [SQL] Delete duplicates

2003-06-22 Thread Rudi Starcevic
Hi, Would this be OK or a little crude (untested) : INSERT INTO new_table ( id, something ) SELECT DISTINCT ON (id) id, something FROM old_table ORDER BY id Or something similar but create a new table ? Cheers Rudi. Denis Arh wrote: How to delete "real" duplicates? id | somthing

[SQL] Delete duplicates

2003-06-22 Thread Rudi Starcevic
Hi, I have a table with duplicates and trouble with my SQL. I'd like to keep a single record and remove older duplicates. For example below of the 6 recods I'd like to keep records 4 and 6. TABLE: aap id | keyword +- 1 | LEAGUE PANTHERS 2 | LEAGUE PANTHERS 3 | LEA

[SQL] Text insert max. size.

2003-06-18 Thread Rudi Starcevic
Hi, I'm doing some planning for storing some xml data and am wondering what is the maximum amount I could insert with one SQL statement. For example if I read an xml file off the hard drive and wanted to store that in a text column what would be the largest file I could insert. How about a 10 K

Re: [SQL] Blobs with perl

2003-06-17 Thread Rudi Starcevic
Hi, For not so big applications you could consider converting the binary image/file into text, using base64, then store the resulting text. For example I have an app. where each member may have one or two images on their account. So when the user upload's their image I base64 it and store the

[SQL] Oops - help error.

2003-01-21 Thread Rudi Starcevic
Sorry .. My apologies I clicked too quick too early .. Please disregard my help request to the wrong address .. Promise it won't happen again .. Thanks for everything Best Regards Rudi. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe comm

[SQL] help

2003-01-21 Thread Rudi Starcevic
help ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[SQL] pg_dump problem

2003-01-15 Thread Rudi Starcevic
large to handle. Do you know where I've gone wrong ? I just want to dump one of my databases, move it to a back up dir. then make changes to the running database. Thank you kindly Regards Rudi Starcevic ---(end of broadcast)--- TIP 3: if pos

Re: [SQL] Analyze + Index

2002-11-28 Thread Rudi Starcevic
Hi, I think I've found what I need to know. From techdocs.postgresql.org >> Every you run an INSERT, UPDATE, or DELETE on an indexed table, PostgreSQL must update all of the table's indexes to reflect the new data (unlike some >> RDBMSs, PostgreSQL updates indexes immediately so they never get

[SQL] Analyze + Index

2002-11-28 Thread Rudi Starcevic
Hi, Say I have a table of 3000 user's, Before I insert another user I need to check if that user is already in there, so I have a 3 column index on a table ( phone,lastname,firstname ). First I check for the user using the index if they are not in there I then add an new user so I now have 3001

[SQL] Dropping Ref. Integrity

2002-11-21 Thread Rudi Starcevic
Hi, I'm trying to drop some referential integrity on a table and am getting this error: PostgreSQL said: ERROR: zero-length delimited identifier Your query: DROP TRIGGER "RI_ConstraintTrigger_6187534" ON "host_domain"; DROP TRIGGER "RI_ConstraintTrigger_6187538" ON "host_domain"; DROP TRIGGER "

Re: [SQL] Problems invoking psql. Help please.

2002-11-19 Thread Rudi Starcevic
>> biko:/usr/bin# psql -U postgres template1 Maybe try : biko:/usr/bin# psql tempate1 -U postgres I use PG on Debian too. I much prefer to compile from source. It's very easy why don't you give it a try. I've never had a problem compiling from source, just make sure to follow the instruction's

Re: [SQL] Referential integrity Freeze

2002-11-04 Thread Rudi Starcevic
Stephan, Thanks for your reply. No I don't have indexes on the *_id fields in bus_pc_idc. Now that you point it out it make perfect sense why this query would take a while and give the impression it's hanging - it's all those seq scans. Thank you kindly, I really appreicate it. Regards Rudi.

[SQL] Referential integrity Freeze

2002-11-04 Thread Rudi Starcevic
Hello, I have two 4 table with referential constraint's that are hanging when I try to delete from them. I have a, users table, ( 3 rows ) suburbs table ( 16000 rows ), regions table ( 54 rows )and a bus_pc_idc table ( business type ) ( 3 rows ) Here is my integrity rules: create ta

[SQL] PLPGSQL errors

2002-10-09 Thread Rudi Starcevic
Hi, I'm getting an error on a function I want to execute and I can't see why. I've tried a few different things and tweaked my sql without joy so far. I want to log all inserts or updates on one table to another table. Below I have my error, function , table schema and sql insert statement. Th

[SQL] Table Rule

2002-10-08 Thread Rudi Starcevic
Hi, I have a Postgresql Rule question I'd love some help with thanks. I have a table, sysmessages, I'd like to keep a journal of. So I create a rule that says on insert or update to this table do insert or update into my sysmessges_log table. My problem is this: sysmessages table has it's own

[SQL] DISTINCT ON

2002-09-12 Thread Rudi Starcevic
Hi, Just quickly, DISTINCT ON - Is that Postgresql only ? Thanks ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] DISTINCT

2002-09-12 Thread Rudi Starcevic
Christopher, Thank you. I though if I'm lucky Chris will be online and will see that one. Kind regards Rudi. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere"

[SQL] DISTINCT

2002-09-12 Thread Rudi Starcevic
Hello, I'd like to select from one table ( contains duplicates ) into a new table. However the new table is exactly the same as the original ( duplicates included ) I think I have a problem with my DISTINCT clause - sql below. It seems the DISTINCT is applied to the whole row not just the 'phon

[SQL] htdig & postgresql

2002-09-11 Thread Rudi Starcevic
Hi, I'm just about to start nutting out way to use htdig and a Postgress database. I've had a quick look around and can't see much out there already. Anyone had any success's ? I want to index text information in a database and output matches in order of relevance. I plan on build a web interf

[SQL] Float / Numeric ?

2002-07-21 Thread Rudi Starcevic
Hi Folks, I have an ecommerce application I'm writing and I'm not sure / undecided on a particular way to store shipping rates in PostgreSQL In this application a user may set the shipping rate per item. So I have 3 fields - local,state and international. A forth field, shipping_type (varchar)

Re: [SQL] Sequence name length

2002-07-16 Thread Rudi Starcevic
Hi Tom, Here is the output from 'select version()' PostgreSQL 7.2 on i686-pc-linux-gnu, compiled by GCC 2.95.2 Cheers Rudi. Tom Lane wrote: >Rudi Starcevic <[EMAIL PROTECTED]> writes: > > >>Just a quick one on the length of the name of a sequence. >>

[SQL] Sequence name length

2002-07-16 Thread Rudi Starcevic
our time and thoughts are very much appreciated. Thank you. Rudi Starcevic. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[SQL] Query kill

2002-07-11 Thread Rudi Starcevic
Hello, If I write a query that is inefficient or in an eternal loop how do I stop it without restarting the postmaster ? I can see many postmaster processed appearing in the output of the 'ps' command. Do I need to stop/kill them all or can I stop just the query I want ? Thanks heaps Rudi. -

[SQL] PostgreSQL - contrib/xml

2002-07-11 Thread Rudi Starcevic
Hello :-) I'm not sure how to compile in the contrib/xml into Posgtresql. I do compile Postgres on my Debian box but I'm not sure about the flags etc to also compile the contrib stuff. I know the standard compile commands / options so in order to get the xml compiled can you tell me what to add

Re: [SQL] XML to Postgres conversion

2002-07-11 Thread Rudi Starcevic
Hi, Hey wow the contrib/xml looks most impresive. I'm so stoopid I've being looking around for xml solutions with even knowing about the contrib/xml in my beloved postgreSQL source. Thanks for the tip. Cheers Rudi. > Look at contrib/xml at > http://developer.postgresql.org/cvsweb.cgi/pgsql/co

Re: [SQL] Selecting data from a table created in another database...

2002-07-03 Thread Rudi Starcevic
x27;s easy to view the output of your selects on the screen and when happy do the insert(s). Hope this helps. Regards Rudi Starcevic. Ligia Pimentel wrote: >I don't know if this can be done... > >In MSSQL Server I can access a table created in another database (on the >same serve

Re: [SQL] skip weekends

2002-06-20 Thread Rudi Starcevic
Hello, Nice reply Josh. I wouldn't call your solution 'ugly' at all. It's an excellent example of a real world need for Postgresql functions. I've also been looking at other functions at http://www.brasileiro.net/postgres/cookbook/. I noticed your name amongst the author's -- nice one -- keep u