Open jberkus opened 7 years ago
Hey, Josh! 👋
So, you're saying to comment out all the COPY statements in these .sql files so that a reader could create all the tables at once by running the whole script? In that case, do you recommend separating the CREATE TABLE statements from the SELECT statement listings also in the file?
Yeah, I was just realizing that all of the select queries are in one file, which really doesn't work with the "run the file" idea.
Chapter 8 is a little different just because those "create table" statements are so large that they're kind of annoying to copy & paste, or to select+execute in pgAdmin. Specifically for chapter 8, it might do to have a separate file for create table just so that the reader can simply execute those, and all the other statements in another file.
OK, that sounds like a good idea. I'll switch that up when I revise the chapter based on your additional comments. Thanks!
Hey, your tech reviewer here.
Example: https://github.com/anthonydb/practical-sql/blob/master/Chapter_08/Chapter_08.sql
The COPY statements are interspersed with table definition statements. The problem with this is that the COPY statements are going to be specific the the reader's OS and where they saved the files. This prevents the reader from simply running the file using PSQL or pgAdmin.
I suggest instead putting the example COPY statements in there, commented out.