pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Why have we got both largeobject and large_object test files?
3+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2017-07-17 d46403d2f3 45c7825733 a6de8d009b 1a3ec19b1a da43d624d0 a570feaf92  Merge large_object.sql test into largeobject.source.
* Why have we got both largeobject and large_object test files?
@ 2017-07-17 15:46  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2017-07-17 15:46 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: pgsql-hackers

I happened to notice that the regression tests contain both
largeobject.sql and large_object.sql.  This seems at best confusing and at
worst a source of mistakes.  The second file was added in March by commit
ff992c074, has never been touched by any other commit, and is only 8 lines
long.  Was there a really good reason not to incorporate that test into
largeobject.sql?

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Why have we got both largeobject and large_object test files?
@ 2017-07-17 16:59  Stephen Frost <sfrost@snowman.net>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Stephen Frost @ 2017-07-17 16:59 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers

Tom,

* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> I happened to notice that the regression tests contain both
> largeobject.sql and large_object.sql.  This seems at best confusing and at
> worst a source of mistakes.  The second file was added in March by commit
> ff992c074, has never been touched by any other commit, and is only 8 lines
> long.  Was there a really good reason not to incorporate that test into
> largeobject.sql?

Just to be clear that we're talking about the same thing- there is no
'largeobject.sql' in a clean source tree.  There is a 'largeobject.source'
in src/test/regress/input which is converted to largeobject.sql.

As for the general question of if the two could be merged, I can't think
of any reason off-hand why that wouldn't work, nor do I have any
particular recollection as to why I created a new file instead of using
the existing.  My shell history tells me that I found largeobject.source
while crafting the test case but not why I didn't use it.

The main thing is that the large_object.sql was specifically added to
test pg_upgrade/pg_dump, so the created object needs to be kept around
in the regression database with the comment after the tests run for that
to happen.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Why have we got both largeobject and large_object test files?
@ 2017-07-17 17:53  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2017-07-17 17:53 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: pgsql-hackers

Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> I happened to notice that the regression tests contain both
>> largeobject.sql and large_object.sql.  This seems at best confusing and at
>> worst a source of mistakes.  The second file was added in March by commit
>> ff992c074, has never been touched by any other commit, and is only 8 lines
>> long.  Was there a really good reason not to incorporate that test into
>> largeobject.sql?

> Just to be clear that we're talking about the same thing- there is no
> 'largeobject.sql' in a clean source tree.  There is a 'largeobject.source'
> in src/test/regress/input which is converted to largeobject.sql.

Right, sorry for the imprecision.

> As for the general question of if the two could be merged, I can't think
> of any reason off-hand why that wouldn't work, nor do I have any
> particular recollection as to why I created a new file instead of using
> the existing.  My shell history tells me that I found largeobject.source
> while crafting the test case but not why I didn't use it.

You've got shell history back to March?  Wow.

> The main thing is that the large_object.sql was specifically added to
> test pg_upgrade/pg_dump, so the created object needs to be kept around
> in the regression database with the comment after the tests run for that
> to happen.

Right.  I was thinking of just appending large_object.sql to the end of
the other file.

It's possible that there's some issue involving race conditions against
some concurrent test, but I'll look around.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2017-07-17 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17 15:46 Why have we got both largeobject and large_object test files? Tom Lane <tgl@sss.pgh.pa.us>
2017-07-17 16:59 ` Stephen Frost <sfrost@snowman.net>
2017-07-17 17:53   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox