Re: [SQL] postgres server crashes unexpectedly

2008-03-18 Thread Colin Wetherbee
Chadwick Horn wrote: It looks to me like psql is managing to start a new connection before the postmaster notices the crash of the prior backend and tells everybody to get out of town. Which is odd, but maybe not too implausible if your kernel is set up to favor interactive processes over

Re: [SQL] finding columns that have three or fewer distinct characters

2008-03-05 Thread Colin Wetherbee
Jeff Frost wrote: I've got an interesting one...I'm trying to find columns that have three or fewer distinct characters (for example, aa). Wondering if I need to write a function or if someone has an idea how to do it with built in functions and/or pattern matching? I think the

Re: [SQL] Function returns error (view)

2008-02-26 Thread Colin Wetherbee
Professor Flávio Brito wrote: When I Test my view I receive SELECT seach_password('user_login_foo') [...] ERROR: column user_login_foo does not exist SQL state: 42703 Context: PL/pgSQL function search_password line 14 at for over execute statement seach_password and search_password are

Re: [SQL] Bouncing replies [was: SQL standards in Mysql]

2008-02-25 Thread Colin Wetherbee
Dean Gibson (DB Administrator) wrote: On 2008-02-22 21:34, Scott Marlowe wrote: Bouncing messages from a public list is kinda rude. No more so, than sending two copies of your reply to me, because you don't go up to your mailer's To: line and manually delete the extra address (as I do on

Re: [SQL] Bounce test

2008-02-25 Thread Colin Wetherbee
Scott Marlowe wrote: On Mon, Feb 25, 2008 at 9:17 PM, Adrian Klaver [EMAIL PROTECTED] wrote: On Monday 25 February 2008 7:13 pm, Dean Gibson (DB Administrator) wrote: I have changed something in my eMail client regarding receiving messages. If a couple people (who don't mind getting

Re: [SQL] outer join issues

2008-02-06 Thread Colin Wetherbee
Tom Hart wrote: Let me preface this by saying hello SQL list, and I'm an idiot. My SQL knowledge is advanced to the point of being able to use a WHERE clause basically, so I appreciate your business. Now on to my issue I have 3 tables I'm trying to use in this query: loan, share and draft

Re: [SQL] JOIN a table twice for different values in the same query

2008-01-15 Thread Colin Wetherbee
Magne Mæhre wrote: Colin Wetherbee wrote: Colin Wetherbee wrote: Phillip Smith wrote: As a side note - all the IATA codes are unique for each airport - wouldn't it be better to use these as the Primary Key and Foreign Keys? Then you wouldn't have to even join the tables unless you wanted

[SQL] JOIN a table twice for different values in the same query

2008-01-10 Thread Colin Wetherbee
Greetings. I have two tables I'm having a little trouble figuring out how to JOIN. One contains a list of airports along with their IATA codes, cities, names, and so forth. This table also contains an id column, which is a serial primary key. The other table contains a list of flights,

Re: [SQL] JOIN a table twice for different values in the same query

2008-01-10 Thread Colin Wetherbee
Paul Lambert wrote: Colin Wetherbee wrote: I would like to construct a query on the flight table that returns the names of both the departure port and the arrival port. The following query shows how I would get just the departure port. js=# SELECT departure_date, jsports.code

Re: [SQL] JOIN a table twice for different values in the same query

2008-01-10 Thread Colin Wetherbee
Phillip Smith wrote: As a side note - all the IATA codes are unique for each airport - wouldn't it be better to use these as the Primary Key and Foreign Keys? Then you wouldn't have to even join the tables unless you wanted the port names (not just the code) This is true, but FWIW, my

Re: [SQL] JOIN a table twice for different values in the same query

2008-01-10 Thread Colin Wetherbee
Colin Wetherbee wrote: Phillip Smith wrote: As a side note - all the IATA codes are unique for each airport - wouldn't it be better to use these as the Primary Key and Foreign Keys? Then you wouldn't have to even join the tables unless you wanted the port names (not just the code

Re: [SQL] Describe Table

2007-12-17 Thread Colin Wetherbee
[EMAIL PROTECTED] wrote: I've reviewed much of the documentation and the forums, but unable to seem to find a easy way to obtain the same thing as the 'psql \d table' through sql. I know I can create through collecting info on table, but seems there must be an easier way. I desire to create a