dbTalk Databases Forums  

[BUGS] BUG #1936: Read-only transactions ignored in COPY

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1936: Read-only transactions ignored in COPY in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alon Goldshuv
 
Posts: n/a

Default [BUGS] BUG #1936: Read-only transactions ignored in COPY - 10-04-2005 , 09:26 AM







The following bug has been logged online:

Bug reference: 1936
Logged by: Alon Goldshuv
Email address: agoldshuv (AT) greenplum (DOT) com
PostgreSQL version: 8 (Current Dev)
Operating system: any
Description: Read-only transactions ignored in COPY
Details:

In the folllowing check (copy.coCopy() ), i *think* that the check for the
is_from flag is mistakenly negated. is_from means -> from file to database,
therefore we should check for <XactReadOnly && is_from>, and not
<XactReadOnly && !is_from>

/* check read-only transaction */
if (XactReadOnly && !is_from &&
!isTempNamespace(RelationGetNamespace(cstate->rel)))
ereport(ERROR,
(errcode(ERRCODE_READ_ONLY_SQL_TRANSACTION),
errmsg("transaction is read-only")));

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.