comment.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * src/include/commands/comment.h
  3. *
  4. *-------------------------------------------------------------------------
  5. *
  6. * comment.h
  7. *
  8. * Prototypes for functions in commands/comment.c
  9. *
  10. * Copyright (c) 1999-2022, PostgreSQL Global Development Group
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef COMMENT_H
  15. #define COMMENT_H
  16. #include "catalog/objectaddress.h"
  17. #include "nodes/parsenodes.h"
  18. /*------------------------------------------------------------------
  19. * Function Prototypes --
  20. *
  21. * The following prototypes define the public functions of the comment
  22. * related routines. CommentObject() implements the SQL "COMMENT ON"
  23. * command. DeleteComments() deletes all comments for an object.
  24. * CreateComments creates (or deletes, if comment is NULL) a comment
  25. * for a specific key. There are versions of these two methods for
  26. * both normal and shared objects.
  27. *------------------------------------------------------------------
  28. */
  29. extern ObjectAddress CommentObject(CommentStmt *stmt);
  30. extern void DeleteComments(Oid oid, Oid classoid, int32 subid);
  31. extern void CreateComments(Oid oid, Oid classoid, int32 subid, const char *comment);
  32. extern void DeleteSharedComments(Oid oid, Oid classoid);
  33. extern void CreateSharedComments(Oid oid, Oid classoid, const char *comment);
  34. extern char *GetComment(Oid oid, Oid classoid, int32 subid);
  35. #endif /* COMMENT_H */