mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 12:41:20 +02:00
Can't COPY TO sequence relation.
Can't inherits from ...
This commit is contained in:
parent
e8647c45d6
commit
e276d8a1a6
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.22 1997/03/12 20:47:32 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.23 1997/04/02 03:57:03 vadim Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -119,6 +119,8 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
|
|||||||
/* Above should not return. */
|
/* Above should not return. */
|
||||||
else {
|
else {
|
||||||
if (from) { /* copy from file to database */
|
if (from) { /* copy from file to database */
|
||||||
|
if ( rel->rd_rel->relkind == RELKIND_SEQUENCE )
|
||||||
|
elog (WARN, "You can't change sequence relation %s", relname);
|
||||||
if (pipe) {
|
if (pipe) {
|
||||||
if (IsUnderPostmaster) {
|
if (IsUnderPostmaster) {
|
||||||
ReceiveCopyBegin();
|
ReceiveCopyBegin();
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.5 1997/01/10 20:17:11 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.6 1997/04/02 03:57:06 vadim Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -264,6 +264,11 @@ MergeAttributes(List *schema, List *supers)
|
|||||||
"MergeAttr: Can't inherit from non-existent superclass '%s'",
|
"MergeAttr: Can't inherit from non-existent superclass '%s'",
|
||||||
name);
|
name);
|
||||||
}
|
}
|
||||||
|
if ( relation->rd_rel->relkind == 'S' )
|
||||||
|
{
|
||||||
|
elog(WARN, "MergeAttr: Can't inherit from sequence superclass '%s'",
|
||||||
|
name);
|
||||||
|
}
|
||||||
tupleDesc = RelationGetTupleDescriptor(relation);
|
tupleDesc = RelationGetTupleDescriptor(relation);
|
||||||
|
|
||||||
for (attrno = relation->rd_rel->relnatts - 1; attrno >= 0; attrno--) {
|
for (attrno = relation->rd_rel->relnatts - 1; attrno >= 0; attrno--) {
|
||||||
|
Loading…
Reference in New Issue
Block a user