-1

On the same line as the @Dylan Hogg (user:249597) you mentioned the sql-app.infocruncher.com hosted library is there one for plpgsql? Would highly help GP migration tasks.

Basically I have the GP function script from which I'd like to get the inventory of table and column names. Ideally the Column data types as well.

Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228

1 Answers1

0

This query provides the information, limited to a specific table:

SELECT column_name, data_type FROM information_schema.columns WHERE table_schema = '<schema name>' AND table_name = '<table name>' ORDER BY ordinal_position;
A. Scherbaum
  • 809
  • 4
  • 8