pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #14338: Problems of quotes with very long text 2+ messages / 2 participants [nested] [flat]
* BUG #14338: Problems of quotes with very long text @ 2016-09-25 13:50 belhaouane.eddy@gmail.com 2016-09-25 19:46 ` Re: BUG #14338: Problems of quotes with very long text Pavel Stehule <pavel.stehule@gmail.com> 0 siblings, 1 reply; 2+ messages in thread From: belhaouane.eddy@gmail.com @ 2016-09-25 13:50 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged on the website: Bug reference: 14338 Logged by: eddydev03 Email address: belhaouane.eddy@gmail.com PostgreSQL version: 9.5.4 Operating system: Windows 7 Description: I found something weird when I simply try to single quote a very long text like a text with 526366 characters. Example: In the SQL execution interface, I copied a text with 526366 characters and then when I do '' and paste my_text inside the quote. the interface change the text like randomly. There is any solution to enter a very long text inside quotes? Thanks for helping guys!!!!! -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #14338: Problems of quotes with very long text 2016-09-25 13:50 BUG #14338: Problems of quotes with very long text belhaouane.eddy@gmail.com @ 2016-09-25 19:46 ` Pavel Stehule <pavel.stehule@gmail.com> 0 siblings, 0 replies; 2+ messages in thread From: Pavel Stehule @ 2016-09-25 19:46 UTC (permalink / raw) To: belhaouane.eddy@gmail.com; +Cc: pgsql-bugs Hi 2016-09-25 15:50 GMT+02:00 <belhaouane.eddy@gmail.com>: > The following bug has been logged on the website: > > Bug reference: 14338 > Logged by: eddydev03 > Email address: belhaouane.eddy@gmail.com > PostgreSQL version: 9.5.4 > Operating system: Windows 7 > Description: > > I found something weird when I simply try to single quote a very long text > like a text with 526366 characters. > > Example: In the SQL execution interface, I copied a text with 526366 > characters and then when I do '' and paste my_text inside the quote. the > interface change the text like randomly. There is any solution to enter a > very long text inside quotes? > > Thanks for helping guys!!!!! > > > 500 kB is not too much for Postgres, but maybe is too for your client. The most simple way is using Large Object interface - you can use psql command \lo_import. Next step is converting imported large object to string. An example is demonstration of import large JSON document. postgres=# \lo_import ~/citylots.json lo_import 16510 CREATE OR REPLACE FUNCTION public.bytea_to_text(bytea) RETURNS text LANGUAGE sql AS $function$ SELECT convert_from($1, current_setting('server_encoding')) $function$ CREATE TABLE city_text(data text); INSERT INTO city_text SELECT bytea_to_text(lo_get(16510)); CREATE TABLE city_json(data json); CREATE TABLE city_jsonb(data jsonb); INSERT INTO city_json SELECT data::json FROM city_text; INSERT INTO city_jsonb SELECT data::jsonb FROM city_text; Probably this is not PostgreSQL bug - please, use psql-general mailing list. Regards Pavel > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs > ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-09-25 19:46 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-09-25 13:50 BUG #14338: Problems of quotes with very long text belhaouane.eddy@gmail.com 2016-09-25 19:46 ` Pavel Stehule <pavel.stehule@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