Expanding * indents an extra level

MikeyCMikeyC Posts: 249 Bronze 3
edited March 8, 2012 11:51AM in SQL Prompt Previous Versions
It is nice to see that the * expansion error from version 4 was worked on, but it wasn't actually fixed. In version 4 the first column was indented correctly, and all the rest of the columns were indented and extra level. Now in version 5 even the first column is indented an extra level. (So it is more consistent even if it is more broken.)

Given this code:
SELECT 
	*<cursor>
FROM msdb.dbo.backupfile;

When you hit TAB you should get:
SELECT 
  backup_set_id,
  first_family_number,
  first_media_number,
  filegroup_name,
  page_size,
  file_number,
  backed_up_page_count,
  file_type,
  source_file_block_size,
  file_size,
  logical_name,
  physical_drive,
  physical_name,
  state,
  state_desc,
  create_lsn,
  drop_lsn,
  file_guid,
  read_only_lsn,
  read_write_lsn,
  differential_base_lsn,
  differential_base_guid,
  backup_size,
  filegroup_guid,
  is_readonly,
  is_present
FROM msdb.dbo.backupfile;

But I actually get:
SELECT 
	  backup_set_id,
	  first_family_number,
	  first_media_number,
	  filegroup_name,
	  page_size,
	  file_number,
	  backed_up_page_count,
	  file_type,
	  source_file_block_size,
	  file_size,
	  logical_name,
	  physical_drive,
	  physical_name,
	  state,
	  state_desc,
	  create_lsn,
	  drop_lsn,
	  file_guid,
	  read_only_lsn,
	  read_write_lsn,
	  differential_base_lsn,
	  differential_base_guid,
	  backup_size,
	  filegroup_guid,
	  is_readonly,
	  is_present
FROM msdb.dbo.backupfile;

While this is a fairly minor bug it is really annoying because this feature is used so often.

Comments

  • Anu DAnu D Posts: 876 Silver 3
    Many thanks for your post.

    We appreciate your feedback and hence logged this as a feature request (option to turn off indentation) in our internal tracking system whose tracking id is SP-3808.

    It will be reviewed by product manager and then marked for the future release.

    I will update you as soon as it is incorporated.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • MikeyCMikeyC Posts: 249 Bronze 3
    Anu,

    I'm not asking for a feature to turn indentation off, I'm asking for a bug to be fixed. I assume what is happening is that the TAB key stroke is being interpreted once to indent, and one to expand the *.

    Or are you saying that it is indenting a level when it expands on purpose? (It never did that in SQL Prompt 3, and SQL Prompt 4 was broken, it got the first column correct, and indented the remaining columns.)
  • MikeyCMikeyC Posts: 249 Bronze 3
    Is there any plans to fix the problem of * expansion indenting an extra level? (It is great that the new 5.2.8.2 version can use tabs, but it is still a pain to have to select the columns that are added and then un-indent them.)

    This has been logged under various SP numbers: SP-2796/2838/3808.
Sign In or Register to comment.