Discussion:
Printing interesting orders.
(too old to reply)
Kevin Wilfong
2011-03-14 20:22:21 UTC
Permalink
Section 3.1 of the assignment specification says that we need to print
all interesting orders, and the output needs to be well-organized and
readable.

Is it sufficient to print the output of nodeToString on the Pathkeys and
Vars that representing these interesting orders?
Earl Oliver
2011-03-16 03:37:31 UTC
Permalink
You can if it does the job. I haven't tested what the output behaviour
of NodeToString is. When I did the assignment, I used the functions in
print.c directly.

What I'm looking for are lists of lists containing:

<relation>.<attribute name>

How you produce the lists are up to you.

Earl
Post by Kevin Wilfong
Section 3.1 of the assignment specification says that we need to print
all interesting orders, and the output needs to be well-organized and
readable.
Is it sufficient to print the output of nodeToString on the Pathkeys and
Vars that representing these interesting orders?
Ken Salem
2011-03-16 04:00:46 UTC
Permalink
Section 3.1 of the assignment specification says that we need to print all interesting orders, and the output needs to be well-organized and readable.
Is it sufficient to print the output of nodeToString on the Pathkeys and Vars that representing these interesting orders?
Try calling print_path on the single-relation paths that you generate. It will generate
a short summary of the path, including that path's PathKeys, like this:

SeqScan(1) rows=20 cost=1.63..1.68
pathkeys: ((e.dno, d.dno))
Kevin Wilfong
2011-03-21 22:09:28 UTC
Permalink
Post by Ken Salem
Post by Kevin Wilfong
Section 3.1 of the assignment specification says that we need to print
all interesting orders, and the output needs to be well-organized and
readable.
Is it sufficient to print the output of nodeToString on the Pathkeys
and Vars that representing these interesting orders?
Try calling print_path on the single-relation paths that you generate.
It will generate
SeqScan(1) rows=20 cost=1.63..1.68
pathkeys: ((e.dno, d.dno))
Thanks,

I noticed this function calls printf instead of printing using elog as
we have needed to for previous assignments. I just wanted to make sure
this is ok as I don't think the assignment specifies that we have to use
elog.
Earl Oliver
2011-03-22 02:57:11 UTC
Permalink
Please output to elog. It would be extra helpful if you prefix
important output with "CS448: ".

I will redirect STDOUT to a file in case you forget, but it is more
convenient to mark if it shows up in the postmaster elog output. The
elog output is flushed immediately, but STDOUT is not flushed until the
buffer is full (it's big) or when the client closes the connection.

Earl
Post by Kevin Wilfong
Post by Ken Salem
Post by Kevin Wilfong
Section 3.1 of the assignment specification says that we need to print
all interesting orders, and the output needs to be well-organized and
readable.
Is it sufficient to print the output of nodeToString on the Pathkeys
and Vars that representing these interesting orders?
Try calling print_path on the single-relation paths that you generate.
It will generate
SeqScan(1) rows=20 cost=1.63..1.68
pathkeys: ((e.dno, d.dno))
Thanks,
I noticed this function calls printf instead of printing using elog as
we have needed to for previous assignments. I just wanted to make sure
this is ok as I don't think the assignment specifies that we have to use
elog.
chris
2011-03-25 05:17:58 UTC
Permalink
In case you didn't stumble upon it while experimenting yet:
printf shows up in the postmaster output unless you redirect the output
stream.
So the print functions should be OK to use.
Post by Kevin Wilfong
Post by Ken Salem
Post by Kevin Wilfong
Section 3.1 of the assignment specification says that we need to print
all interesting orders, and the output needs to be well-organized and
readable.
Is it sufficient to print the output of nodeToString on the Pathkeys
and Vars that representing these interesting orders?
Try calling print_path on the single-relation paths that you generate.
It will generate
SeqScan(1) rows=20 cost=1.63..1.68
pathkeys: ((e.dno, d.dno))
Thanks,
I noticed this function calls printf instead of printing using elog as
we have needed to for previous assignments. I just wanted to make sure
this is ok as I don't think the assignment specifies that we have to use
elog.
Loading...