Annotation of 43BSD/ingres/doc/quel/copy.nr, revision 1.1

1.1     ! root        1: .th COPY QUEL 1/19/79
        !             2: .sh NAME
        !             3: copy \- copy data into/from a relation from/into a \*(UU file.
        !             4: .sh SYNOPSIS
        !             5: .bd copy
        !             6: relname 
        !             7: (domname = format {, domname = format })
        !             8: .br
        !             9: .ti +10
        !            10: direction "filename"
        !            11: .sh DESCRIPTION
        !            12: .it Copy 
        !            13: moves data between \*(II relations and standard \*(UU files.
        !            14: .it Relname 
        !            15: is the name of an existing relation.
        !            16: In general 
        !            17: .it domname 
        !            18: identifies a domain in 
        !            19: .it relname.
        !            20: .it Format 
        !            21: indicates the format the \*(UU file
        !            22: should have for the corresponding domain.
        !            23: .it Direction 
        !            24: is either 
        !            25: .bd into
        !            26: or 
        !            27: .bd from.
        !            28: .it Filename 
        !            29: is the full \*(UU pathname of the file.
        !            30: .s3
        !            31: On a copy 
        !            32: .bd from 
        !            33: a file to a relation,
        !            34: the relation cannot have a secondary index,
        !            35: it must be owned by you,
        !            36: and it must be updatable (not a secondary index
        !            37: or system relation).
        !            38: .s3
        !            39: .it Copy 
        !            40: cannot be used on a relation which is a view.
        !            41: For a copy 
        !            42: .bd into
        !            43: a \*(UU file,
        !            44: you must either be the owner of the relation or
        !            45: the relation must have retrieve permission for
        !            46: all users,
        !            47: or all permissions for all users.
        !            48: .s3
        !            49: The formats allowed by copy are:
        !            50: .in +5
        !            51: .s1
        !            52: .ti-5
        !            53: .bd "i1,i2,i4"
        !            54: \- The data is
        !            55: stored as an integer of length 1, 2, or 4 bytes in the \*(UU file.
        !            56: .s1
        !            57: .ti-5
        !            58: .bd "f4,f8"
        !            59: \- The data is stored as a floating point
        !            60: number (either single or double precision) in the \*(UU file.
        !            61: .s1
        !            62: .ti-5
        !            63: .bd "c1,c2,...,c255"
        !            64: \- The data is stored as a fixed length string of
        !            65: characters.
        !            66: .s1
        !            67: .ti -5
        !            68: .bd "c0"
        !            69: \- Variable length character string.
        !            70: .s1
        !            71: .ti -5
        !            72: .bd "d0,d1,...,d255"
        !            73: \- Dummy domain.
        !            74: .in -5
        !            75: .s3
        !            76: Corresponding domains in the relation
        !            77: and the \*(UU file do not have to be the
        !            78: same type or length.
        !            79: .it Copy 
        !            80: will convert as necessary.
        !            81: When converting anything except character to
        !            82: character, 
        !            83: .it copy 
        !            84: checks for overflow.
        !            85: When converting from character to character,
        !            86: .it copy 
        !            87: will blank pad or truncate on the right as necessary.
        !            88: .s3
        !            89: The domains should be ordered according to
        !            90: the way they should appear in the \*(UU file.
        !            91: Domains are matched according to name,
        !            92: thus the order of the domains in the relation
        !            93: and in the \*(UU file does not have to be the same.
        !            94: .s3
        !            95: .it Copy 
        !            96: also provides for variable length strings
        !            97: and dummy domains.
        !            98: The action taken depends on whether
        !            99: it is a copy 
        !           100: .bd into
        !           101: or a copy 
        !           102: .bd from.
        !           103: Delimitors for variable length strings and
        !           104: for dummy domains can be selected from the list of:
        !           105: .in+4
        !           106: .s3
        !           107: .bd "nl"
        !           108: \- new line character
        !           109: .br
        !           110: .bd "tab"
        !           111: \- tab character
        !           112: .br
        !           113: .bd "sp"
        !           114: \- space
        !           115: .br
        !           116: .bd nul 
        !           117: or 
        !           118: .bd null
        !           119: \- null character
        !           120: .br
        !           121: .bd "comma"
        !           122: \- comma
        !           123: .br
        !           124: .bd "colon"
        !           125: \- colon
        !           126: .br
        !           127: .bd "dash"
        !           128: \- dash
        !           129: .br
        !           130: .bd "lparen"
        !           131: \- left parenthesis
        !           132: .br
        !           133: .bd "rparen"
        !           134: \- right parenthesis
        !           135: .br
        !           136: .it "x"
        !           137: \- any single character 'x'
        !           138: .in -4
        !           139: .s3
        !           140: The special meaning of any delimitor can be
        !           141: turned off by preceeding the delimitor with
        !           142: a `\\'.
        !           143: The type specifier can optionally be in quotes ("c0delim").
        !           144: This is usefully if you wish to use a single character
        !           145: delimitor which has special meaning to the \s-2QUEL\s0 parser.
        !           146: .s3
        !           147: When the 
        !           148: .it direction 
        !           149: is 
        !           150: from, 
        !           151: .it copy 
        !           152: appends data into the relation
        !           153: .bd from
        !           154: the \*(UU file.
        !           155: Domains in the \*(II relation which are not
        !           156: assigned values from the \*(UU file are assigned
        !           157: the default value of zero for numeric
        !           158: domains, and blank for character
        !           159: domains.
        !           160: When copying in this direction the following
        !           161: special meanings apply:
        !           162: .in +5
        !           163: .s3
        !           164: .ti -5
        !           165: .bd c0\c
        !           166: .it delim 
        !           167: \- The data in the \*(UU file is a variable
        !           168: length character string terminated by the
        !           169: delimitor 
        !           170: .it delim.
        !           171: If 
        !           172: .it delim
        !           173: is missing then the first
        !           174: comma, tab, or newline encountered will
        !           175: terminate the string.
        !           176: The delimitor is not copied.
        !           177: .s3
        !           178: For example:
        !           179: .in +5
        !           180: pnum=c0
        !           181: \- string ending in comma, tab, or nl.
        !           182: .br
        !           183: pnum=c0nl 
        !           184: \- string ending in nl.
        !           185: .br
        !           186: pnum=c0sp 
        !           187: \- string ending in space.
        !           188: .br
        !           189: pnum=c0z  
        !           190: \- string ending in the character `z'.
        !           191: .br
        !           192: pnum="c0%"  
        !           193: \- string ending in the character `%'.
        !           194: .in -5
        !           195: .s3
        !           196: A delimitor can be escaped by preceeding it with a
        !           197: `\\'.
        !           198: For example,
        !           199: using 
        !           200: .bd "name = c0\c"
        !           201: \&, the string 
        !           202: ``Blow\\, Joe,''
        !           203: will be accepted into the domain as
        !           204: ``Blow, Joe''.
        !           205: .s1
        !           206: .ti -5
        !           207: .bd d0\c
        !           208: .it delim 
        !           209: \- The data in the \*(UU file
        !           210: is a variable length character string
        !           211: delimited by 
        !           212: .it delim\c
        !           213: \&.
        !           214: The string is read and discarded.
        !           215: The delimitor rules are identical for
        !           216: .bd c0
        !           217: and
        !           218: .bd d0.
        !           219: The domain name is ignored.
        !           220: .s1
        !           221: .ti -5
        !           222: .bd d1,d2,...,d255 
        !           223: \- The data in the \*(UU file is a
        !           224: fixed length character string.
        !           225: The string is read and discarded.
        !           226: The domain name is ignored.
        !           227: .s3
        !           228: .in -5
        !           229: When the direction is 
        !           230: .bd into,
        !           231: .it copy 
        !           232: transfers data
        !           233: .bd into
        !           234: the \*(UU file
        !           235: from the relation.
        !           236: If the file already existed, it is truncated to zero
        !           237: length before copying begins.
        !           238: When copying in this direction,
        !           239: the following special meanings apply:
        !           240: .s3
        !           241: .in +5
        !           242: .ti -5
        !           243: .bd c0 
        !           244: \- The domain value is converted to a
        !           245: fixed length character string and writted
        !           246: into the \*(UU file.
        !           247: For character domains, the length will be the
        !           248: same as the domain length.
        !           249: For numeric domains, the standard \*(II
        !           250: conversions will take place as specified
        !           251: by the `\c
        !           252: .bd \-i\c
        !           253: \&', `\c
        !           254: .bd \-f\c
        !           255: \&',
        !           256: and `\c
        !           257: .bd \-c\c
        !           258: \&'
        !           259: flags (see ingres(unix)).
        !           260: .s1
        !           261: .ti -5
        !           262: .bd c0\c
        !           263: .it delim 
        !           264: \- The domain will be converted according to
        !           265: the rules for 
        !           266: .bd c0
        !           267: above.
        !           268: The one character delimitor will be inserted
        !           269: immediately after the domain.
        !           270: .s1
        !           271: .ti -5
        !           272: .bd d1,d2,...,d255 
        !           273: \- The domain name is taken to be
        !           274: the name of the delimitor.
        !           275: It is written into the \*(UU file 1 time for 
        !           276: .bd d1,
        !           277: 2 times for 
        !           278: .bd d2,
        !           279: etc.
        !           280: .s1
        !           281: .ti -5
        !           282: .bd d0 
        !           283: \- This format is ignored on a copy 
        !           284: .bd into.
        !           285: .s1
        !           286: .ti -5
        !           287: .bd d0\c
        !           288: .it delim 
        !           289: \- The 
        !           290: .it delim 
        !           291: is written into the file.
        !           292: The domain name is ignored.
        !           293: .s1
        !           294: .in -5
        !           295: .s3
        !           296: If no domains appear in the copy command
        !           297: (i.e. copy relname () into/from "filename")
        !           298: then 
        !           299: .it copy
        !           300: automatically does a ``bulk'' copy of
        !           301: all domains, using the order and format
        !           302: of the domains in the relation.
        !           303: This is provided as a convenient shorthand
        !           304: notation for copying and restoring entire relations.
        !           305: .s3
        !           306: To 
        !           307: .it copy
        !           308: into a relation, you must be the owner
        !           309: or all users must have all permissions set.
        !           310: Correspondingly, to 
        !           311: .it copy
        !           312: from a relation you must own the relation
        !           313: or all users must have at least retrieve permission on the
        !           314: relation.
        !           315: Also, you may not 
        !           316: .it copy 
        !           317: a view.
        !           318: .sh EXAMPLE
        !           319: .nf
        !           320: /\*(** Copy data into the emp relation \*(**/
        !           321:    copy emp (name=c10,sal=f4,bdate=i2,mgr=c10,xxx=d1) 
        !           322:               from "/mnt/me/myfile"
        !           323: .s1
        !           324: /\*(** Copy employee names and their salaries into a file \*(**/
        !           325:    copy emp (name=c0,comma=d1,sal=c0,nl=d1)
        !           326:                 into "/mnt/you/yourfile"
        !           327: .s1
        !           328: /\*(** Bulk copy employee relation into file \*(**/
        !           329:    copy emp ()
        !           330:                 into "/mnt/ours/ourfile"
        !           331: .s1
        !           332: /\*(** Bulk copy employee relation from file \*(**/
        !           333:    copy emp ()
        !           334:                 from "/mnt/thy/thyfile"
        !           335: .fi
        !           336: .sh "SEE ALSO"
        !           337: append(quel), create(quel), quel(quel),
        !           338: permit(quel), view(quel),
        !           339: ingres(unix)
        !           340: .sh BUGS
        !           341: .it Copy 
        !           342: stops operation at the first error.
        !           343: .s3
        !           344: When specifying 
        !           345: .it filename\c
        !           346: , the entire \*(UU directory
        !           347: pathname must be provided, since \*(II operates out of
        !           348: a different directory than the user's working directory at the
        !           349: time \*(II is invoked.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.