pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #18189: Value partitioned tables: Upd ERROR: more than one row returned by a subquery used as an expression
2+ messages / 2 participants
[nested] [flat]

* BUG #18189: Value partitioned tables: Upd ERROR: more than one row returned by a subquery used as an expression
@ 2023-11-10 11:07  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2023-11-10 11:07 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: buschmann@nidsa.net

The following bug has been logged on the website:

Bug reference:      18189
Logged by:          Hans Buschmann
Email address:      buschmann@nidsa.net
PostgreSQL version: 16.1
Operating system:   Fedora 39 x86-64 64bit, also on Win64
Description:        

Recently I worked with GAIA astronomical data to import them into my
self-defined data tables.
The table layout is quite old (pg11?) and still has some limitations of that
time.

I adopted the import statement to reflect the new data structure.

On almost every try to import a source file I got the error:

psql:source_to_arrays_ERR.sql:179: ERROR:  more than one row returned by a
subquery used as an expression

BUT: in my statements there are no subqueries used as an expression!

The little data file GaiaSource_262134-265343_3E.csv successes on the update
query and produces no error.

The greater data file GaiaSource_131011-132722_1E.csv shows the error.

The error was first detected on pg 16.0 but is also present in 16.1

Steps to reproduce:

1. save all attachments to a directory
2. unzip the 2 data files
3. manually execute the steps in steps_for_partition_err.sql (no full
automation because of filepaths etc.)

Background:

My suspicion of a possible cause comes from the value partitioned tables.
I have a newer version which uses range partitioned tables and a slight
adjusted update statement. This succeeds in importing all of these data
files without error.

I think there is a hidden error in processing this statement, which seems
generally correct from a users perspective as shown by the little data
set.

PS: since https://www.postgresql.org/account/submitbug/ does not allow
attachments, they are put in a followup message!

Thank you for investigating!

Hans Buschmann



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

* Re: BUG #18189: Value partitioned tables: Upd ERROR: more than one row returned by a subquery used as an expression
@ 2023-11-10 15:18  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2023-11-10 15:18 UTC (permalink / raw)
  To: buschmann@nidsa.net; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> On almost every try to import a source file I got the error:
> psql:source_to_arrays_ERR.sql:179: ERROR:  more than one row returned by a
> subquery used as an expression
> BUT: in my statements there are no subqueries used as an expression!

It's probably there somewhere ...

> Steps to reproduce:
> 1. save all attachments to a directory

Sadly, there are no attachments here; I don't think our bug-submission
webform can handle them.  When you need attachments, I'd suggest just
mailing the pgsql-bugs list directly without bothering with the webform.

			regards, tom lane





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


end of thread, other threads:[~2023-11-10 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-11-10 11:07 BUG #18189: Value partitioned tables: Upd ERROR: more than one row returned by a subquery used as an expression PG Bug reporting form <noreply@postgresql.org>
2023-11-10 15:18 ` 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