Questions tagged [comments]

11 questions
42
votes
1 answer

Changing mysql table comment

I know that mysql table comment can be defined at the creation with: create table (...)comment='table_comment'; And you can display comments by: show table status where name='table_name'; How do you change (alter?) table comment after it's been…
v14t
  • 523
  • 1
  • 4
  • 6
9
votes
1 answer

Comments in EXPDB parameter file

Is there a way to put comments in a data pump export parameter file?
Leigh Riffel
  • 23,884
  • 17
  • 80
  • 155
8
votes
1 answer

What is the maximum length of a comment in PostgreSQL?

PostgreSQL has a special piece of a functionality called COMMENT which attaches metadata to an identifier or any type (schema, table, column, function, type, domain, etc). It looks like this, COMMENT ON TABLE mytable IS 'This is my table.'; Is…
Evan Carroll
  • 65,432
  • 50
  • 254
  • 507
6
votes
1 answer

When creating stored procedure, are the comments before the definition always preserved?

When I wrote some comments before the CREATE PROCEDURE command, those comments seem to be preserved as part of procedure definition. For example, when I create procedure like this /*Comment header*/ CREATE OR ALTER PROCEDURE example_procedure AS…
6
votes
2 answers

SQL Comments disappear with psql and `\e`

Is there anyway at all, ever to change the behavior of comments in psql. Take the query below. Execute it. CREATE TABLE foo AS SELECT x AS id, -- x AS id2, x AS id3 FROM generate_series(1,50) AS x; Run that in psql. Then run \e. Now at…
Evan Carroll
  • 65,432
  • 50
  • 254
  • 507
3
votes
1 answer

Can comments in stored procedures cause problems

We're running a webserver that calls stored procedures to compute complex queries. Using sp_who2, we've discovered a peculiar issue where an abnormal number of processes would be stuck on SELECT state for a long duration. I've ran this sp to track…
TtT23
  • 275
  • 2
  • 12
2
votes
1 answer

Line Comment in MongoDB config file

How to mark a line comment in mongodb configuration file? cpu=true #temporary for dev env Is this the right way? There is no clue about it in their website page about setting the configuration options.
abhisekp
  • 123
  • 1
  • 5
2
votes
2 answers

How can can I get object definitions stripped of all comments?

When I want to know if a stored procedure or views references a given name (table, view or column), I need a version of the object definition stripped of all comments. Is this possible by a SQL query in an usual DBMS system? Edit: For SQL Server I…
bernd_k
  • 12,369
  • 24
  • 79
  • 111
1
vote
1 answer

Is the "comments" field in pgAdmin 4 a pgAdmin thing, or is it a PostgreSQL feature?

If I right-click a table (or any object) in pgAdmin 4 and select "Properties", it brings up a GUI window which allows me to change the name of the table and many other things. One of the fields is called "Comment". The manual for pgAdmin 4 just…
0
votes
1 answer

Can show the comments writing in the create table command?

We can write comment to create a table: create database `mytest`; use `mytest`; create table `mytest` ( /* mytest mytest */ `code` varchar(15) NOT NULL, `type` varchar(20) NOT NULL ); How can show the comment /* mytest mytest */ in create…
showkey
  • 386
  • 1
  • 8
  • 20
0
votes
2 answers

SQL SERVER: How to get the stored procedure text EXCLUDING comments?

I need to find all the stored procs that use Transactions, as I want to enable transaction abort to those procedures. However, --I didn't do this; it's inherited-- many of the stored procedures contain testing procedures with in comment blocks and…