pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedcsv vs json?
4+ messages / 3 participants
[nested] [flat]
* csv vs json?
@ 2023-01-04 17:09 Rich Pixley <rich.pixley@hayden.ai>
2023-01-09 22:55 ` Re: csv vs json? Samed YILDIRIM <samed@reddoc.net>
0 siblings, 1 reply; 4+ messages in thread
From: Rich Pixley @ 2023-01-04 17:09 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
I'm downloading a table in csv using pgAdmin. Some tables work just
fine. Others have JSON fields in the table and these aren't. What I
get instead is a string with multiple unquoted double quotes that are,
correctly I think, complained about by my csv reader.
Is there a way to get these quoted properly? Am I doing something
stupid? Is this a bug?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: csv vs json?
2023-01-04 17:09 csv vs json? Rich Pixley <rich.pixley@hayden.ai>
@ 2023-01-09 22:55 ` Samed YILDIRIM <samed@reddoc.net>
2023-01-09 23:33 ` Re: csv vs json? Rich Pixley <rich.pixley@hayden.ai>
0 siblings, 1 reply; 4+ messages in thread
From: Samed YILDIRIM @ 2023-01-09 22:55 UTC (permalink / raw)
To: Rich Pixley <rich.pixley@hayden.ai>; +Cc: pgsql-admin@lists.postgresql.org
Hi Rich,
It is hard to say what the problem is you encountered and offer any
solution. Can you share the error message you got and example lines from
your csv file?
I only can recommend you to check the document on the link below. CSV
format of file might not match with default settings of PostgreSQL. You can
adjust via parameters, such as delimiter, quote, and escape.
https://www.postgresql.org/docs/current/sql-copy.html
Best regards.
Samed YILDIRIM
On Wed, 4 Jan 2023 at 19:10, Rich Pixley <rich.pixley@hayden.ai> wrote:
> I'm downloading a table in csv using pgAdmin. Some tables work just
> fine. Others have JSON fields in the table and these aren't. What I
> get instead is a string with multiple unquoted double quotes that are,
> correctly I think, complained about by my csv reader.
>
> Is there a way to get these quoted properly? Am I doing something
> stupid? Is this a bug?
>
>
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: csv vs json?
2023-01-04 17:09 csv vs json? Rich Pixley <rich.pixley@hayden.ai>
2023-01-09 22:55 ` Re: csv vs json? Samed YILDIRIM <samed@reddoc.net>
@ 2023-01-09 23:33 ` Rich Pixley <rich.pixley@hayden.ai>
2023-01-09 23:58 ` Re: csv vs json? David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Rich Pixley @ 2023-01-09 23:33 UTC (permalink / raw)
To: Samed YILDIRIM <samed@reddoc.net>; +Cc: pgsql-admin@lists.postgresql.org
No error message.
And there was no quoting. That's the bug.
On 1/9/23 3:55 PM, Samed YILDIRIM wrote:
> Hi Rich,
>
> It is hard to say what the problem is you encountered and offer any
> solution. Can you share the error message you got and example lines
> from your csv file?
>
> I only can recommend you to check the document on the link below. CSV
> format of file might not match with default settings of PostgreSQL.
> You can adjust via parameters, such as delimiter, quote, and escape.
>
> https://www.postgresql.org/docs/current/sql-copy.html
>
> Best regards.
> Samed YILDIRIM
>
>
> On Wed, 4 Jan 2023 at 19:10, Rich Pixley <rich.pixley@hayden.ai> wrote:
>
> I'm downloading a table in csv using pgAdmin. Some tables work just
> fine. Others have JSON fields in the table and these aren't. What I
> get instead is a string with multiple unquoted double quotes that
> are,
> correctly I think, complained about by my csv reader.
>
> Is there a way to get these quoted properly? Am I doing something
> stupid? Is this a bug?
>
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: csv vs json?
2023-01-04 17:09 csv vs json? Rich Pixley <rich.pixley@hayden.ai>
2023-01-09 22:55 ` Re: csv vs json? Samed YILDIRIM <samed@reddoc.net>
2023-01-09 23:33 ` Re: csv vs json? Rich Pixley <rich.pixley@hayden.ai>
@ 2023-01-09 23:58 ` David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: David G. Johnston @ 2023-01-09 23:58 UTC (permalink / raw)
To: Rich Pixley <rich.pixley@hayden.ai>; +Cc: Samed YILDIRIM <samed@reddoc.net>; pgsql-admin@lists.postgresql.org
On Mon, Jan 9, 2023 at 3:33 PM Rich Pixley <rich.pixley@hayden.ai> wrote:
> No error message.
>
> And there was no quoting. That's the bug.
>
You may wish to report this to the separate pgAdmin project, this list is
for core PostgreSQL but your complaint doesn't seem to be with it.
But I'm suspecting this is more a problem with your expectations rather
than the system producing invalid content. But as you haven't provided a
self-contained example, including output, it is impossible to say
definitely where you are confused, or not, if indeed there is a bug.
You may wish to remove pgAdmin from the equation entirely and use the core
PostgreSQL program psql. It is usually easier to produce a self-contained
script if you don't involve a GUI program into the process flow.
David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2023-01-09 23:58 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04 17:09 csv vs json? Rich Pixley <rich.pixley@hayden.ai>
2023-01-09 22:55 ` Samed YILDIRIM <samed@reddoc.net>
2023-01-09 23:33 ` Rich Pixley <rich.pixley@hayden.ai>
2023-01-09 23:58 ` David G. Johnston <david.g.johnston@gmail.com>
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