Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Andrew Sullivan
On Sat, Oct 24, 2015 at 07:33:15PM -0700, David Blomstrom wrote: > It seems like a command-line tool would be > incredibly tedious when creating tables, modifying them, filling them with > data, etc. For whatever it's worth, I find quite the opposite: once you have the hang of the command line,

Re: [GENERAL] partial JOIN (was: ID column naming convention)

2015-10-25 Thread Rafal Pietrak
W dniu 24.10.2015 o 23:25, Dane Foster pisze: > > On Sat, Oct 24, 2015 at 5:23 PM, Dane Foster > wrote: > [] > -- > Sent via pgsql-general mailing list > (pgsql-general@postgresql.org

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Joshua D. Drake
On 10/24/2015 09:19 PM, David Blomstrom wrote: I'm a writer. I studied programing and MySQL so I could create websites that I can publish my articles to. I don't have time to keep up with the endless technology - MySQL, PDO, stored procedures, PHP, JavaScript, JQuery, and on and on - especially

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Melvin Davidson
Since you are just starting, you should probably familarize yourself with how PgAdmin works with PostgreSQL. Therefore, it is best you refer to the documentation for PgAdmin. PgAdmin III http://www.pgadmin.org/docs/1.20/index.html I also suggest you obtain a copy of one, or both, of the

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Adrian Klaver
On 10/24/2015 09:19 PM, David Blomstrom wrote: I'm a writer. I studied programing and MySQL so I could create websites that I can publish my articles to. I don't have time to keep up with the endless technology - MySQL, PDO, stored procedures, PHP, JavaScript, JQuery, and on and on - especially

Re: [GENERAL] Duplicate rows during pg_dump

2015-10-25 Thread Jim Nasby
On 10/24/15 3:15 PM, Marc Mamin wrote: Any suggestions for what to look for next? Is it table corruption? Most likely is the index corrupt, not the table. You should check for further duplicates, fix them and as Adrian writes, build a new index an then drop the corrupt one. I've seen this a

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread Adrian Klaver
On 10/25/2015 06:10 PM, David Blomstrom wrote: @ Adrian Klaver: Oh, so you're suggesting I make separate tables for kingdoms, classes and on down to species. I'll research foreign keys and see what I can come up with. I hope I can make separate tables for mammal species, bird species, fish

Re: [GENERAL] partial JOIN (was: ID column naming convention)

2015-10-25 Thread Jim Nasby
On 10/25/15 2:30 AM, Rafal Pietrak wrote: So personally, I don't see a star in a select list so harmfull, quite the oposit. Using * outside the database is generally very dangerous. Using it *inside* the database can be very useful, because frequently it's exactly what you want (give me all

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread David Blomstrom
What was amazed me is the HUGE tables (as in too big to work with or publish online) that, as near as I can remember, have rows like this... panthera-leo (lion) | Panthera | Felidae | Carnivora | Mammalia | Chordata | Animalia cramming virtually the entire hierarchy into every single row. Some

[GENERAL] I'm starting a PostgreSQL user's group in Pittsburgh

2015-10-25 Thread Bill Moran
I'm going to see if I can drum up enough interest for a PostgreSQL user's group in the Pittsburgh area. After talking to the organizers of the Philadelphia PUG, I decided to try using Meetup to coordinate things: http://www.meetup.com/Pittsburgh-PostgreSQL-Users-Group/ If you're in the

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread John R Pierce
On 10/25/2015 6:10 PM, David Blomstrom wrote: What does EOL mean? "End of Life" -- john r pierce, recycling bits in santa cruz -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread David Blomstrom
@ Adrian Klaver: Oh, so you're suggesting I make separate tables for kingdoms, classes and on down to species. I'll research foreign keys and see what I can come up with. I hope I can make separate tables for mammal species, bird species, fish species, etc. There are just so many species -

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread David Blomstrom
My ultimate goal is to have separate fields for 1) traditional scientific names, 2) LSID's and 3) common names, which are the most confusing thing of all. Some common names are relatively simple and more stable than scientific names - e.g. aardvark and polar bear. The URL MySite/life/polar-bear

Re: [GENERAL] Duplicate rows during pg_dump

2015-10-25 Thread Tom Lane
Jim Nasby writes: > On 10/24/15 3:15 PM, Marc Mamin wrote: > Any suggestions for what to look for next? Is it table corruption? >> Most likely is the index corrupt, not the table. >> You should check for further duplicates, fix them and as Adrian writes, >> build a new

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread Adrian Klaver
On 10/25/2015 09:10 PM, David Blomstrom wrote: It's also interesting that some entities (e.g. EOL) are now using something called Life Science ID's (or something like that) in lieu of traditional scientific names. It sounds like a cool idea, but some of the LSID's seem awfully big and complex to

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread David Blomstrom
Making it more confusing, I believe there are several different series of numerical ID's. See this page, for example... https://www.wikidata.org/wiki/Q46212 On Sun, Oct 25, 2015 at 9:10 PM, David Blomstrom wrote: > It's also interesting that some entities (e.g. EOL)

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread David Blomstrom
It's also interesting that some entities (e.g. EOL) are now using something called Life Science ID's (or something like that) in lieu of traditional scientific names. It sounds like a cool idea, but some of the LSID's seem awfully big and complex to me. I haven't figured out exactly what the codes

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread David Blomstrom
LOL - I don't think there are any natural keys here. Traditional scientific names are amazingly flaky. I guess I shouldn't call them flaky; it's just that no one has ever figured out a way do deal with all the complexities of classification. The new LSID's might be more stable - but which LSID

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread David Blomstrom
It's hard to imagine creating a table with a command-line tool - in the step-by-step process I use with phpMyAdmin, that is. If you can learn the proper syntax for creating a table and put together a script for a generic table that you can easily modify, then maybe it would be a lot easier with a

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread David Blomstrom
Wow, great tips; you answered a question I was about to post either here or on a forum. One question, though. Someone said when you add a new column in Postgre, it's appended to the end of the table. Does that mean that's where it has to stay, or can you rearrange columns, as in MySQL? On Sun,

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread David Blomstrom
I'm sorry, I don't know exactly what you mean by "definitions." The fields Taxon and Parent are both varchar, with a 50-character limit. ParentID is int(1). Here's a discussion that describes the table in a little more detail --

Re: [GENERAL] Using PostgreSQL with MySQL

2015-10-25 Thread Adrian Klaver
On 10/25/2015 09:37 AM, David Blomstrom wrote: I've already learned that I can install and use MySQL and PostgreSQL simultaneously on my laptop, though I haven't yet learned how to connect to my Postgre database from a web page, write a query, etc. So here's what I'm planning... FYI, the short

Re: [GENERAL] Using PostgreSQL with MySQL

2015-10-25 Thread David Blomstrom
Oh my God, Whatcom County. I went to school in Bellingham years ago, when the population was just 50,000. It was such a beautiful place, I'd be afraid to go back. ;) Thanks for the tips. On Sun, Oct 25, 2015 at 10:46 AM, Adrian Klaver wrote: > On 10/25/2015 09:37 AM,

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread Adrian Klaver
On 10/25/2015 08:48 AM, David Blomstrom wrote: I'm creating a website focusing on living things (mostly animals). I have multiple huge MySQL database tables with animal taxons arranged in a parent-child relationship. I was trying to figure out how I could navigate to a URL like

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread Alban Hertroys
> On 25 Oct 2015, at 19:38, Adrian Klaver wrote: > > On 10/25/2015 11:12 AM, David Blomstrom wrote: >> I'm sorry, I don't know exactly what you mean by "definitions." The >> fields Taxon and Parent are both varchar, with a 50-character limit. >> ParentID is int(1). >

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Andrew Sullivan
On Sun, Oct 25, 2015 at 07:57:48AM -0700, David Blomstrom wrote: > In phpMyAdmin, I've become accustomed to simply copying existing tables, > then adding, deleting and renaming columns as needed. Oh! Interesting. I suspect you're actually _undermining_ your ability to use the database (because

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Rob Sargent
> On Oct 25, 2015, at 3:21 AM, Joshua D. Drake wrote: > > I would ignore Rob, he obviously is suffering from a lack of coffee. Our > community always tries to help new users. It is great to see you here. > > Sincerely, > > JD > Always the best advice :) OK,

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread David Blomstrom
No problem. I'm pretty grumpy when people invade MY turf - biology and education reform. As a former Seattle teacher who spent sixteen years in the meat grinder before becoming a whistle-blower, I've seen it all - and I know it all. ;) On Sun, Oct 25, 2015 at 8:41 AM, Karsten Hilbert

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Adrian Klaver
On 10/25/2015 07:57 AM, David Blomstrom wrote: It's hard to imagine creating a table with a command-line tool - in the step-by-step process I use with phpMyAdmin, that is. If you can learn the proper syntax for creating a table and put together a script for a generic table that you can easily

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Karsten Hilbert
On Sun, Oct 25, 2015 at 08:32:43AM -0700, David Blomstrom wrote: > Someone said when you add a new column in Postgre, it's appended to the end > of the table. Does that mean that's where it has to stay, or can you > rearrange columns No, unless you drop/re-create the table (manually or with

[GENERAL] Recursive Arrays 101

2015-10-25 Thread David Blomstrom
I'm creating a website focusing on living things (mostly animals). I have multiple huge MySQL database tables with animal taxons arranged in a parent-child relationship. I was trying to figure out how I could navigate to a URL like MySite/life/mammals and display the number of children (i.e.

[GENERAL] Using PostgreSQL with MySQL

2015-10-25 Thread David Blomstrom
I've already learned that I can install and use MySQL and PostgreSQL simultaneously on my laptop, though I haven't yet learned how to connect to my Postgre database from a web page, write a query, etc. So here's what I'm planning... I have several big, complex websites driven by a MySQL database.

Re: [GENERAL] Recursive Arrays 101

2015-10-25 Thread Adrian Klaver
On 10/25/2015 11:12 AM, David Blomstrom wrote: I'm sorry, I don't know exactly what you mean by "definitions." The fields Taxon and Parent are both varchar, with a 50-character limit. ParentID is int(1). By definition I meant the schema, so from the below: CREATE TABLE t ( N INT(6) default