Download List

Project Description

show create table for PostgreSQL

  • This SQL function returns a CREATE TABLE statement for the table assigned.
  • PostgreSQL にて CREATE TABLE 文を取得するための SQL 関数です。 PostgreSQL では pg_dump --schema-only コマンドで CREATE TABLE 文を取得できますが、 DB 接続や psql コンソールなどから取得することができません。 本 SQL は、それを実現するためのものです。

Features

  • このファンクションは、SQL文1つから構成されますので、
    • PostgreSQL の設定変更なしに利用することができます。
    • PHP, Java, Ruby 等、お好きな言語に組み込むことができます。
      • 例:1) $1, $2 を言語ごとの変数にする、2) ダブルクオーテーションをエスケープする (" -> \")
  • This function is written in SQL. This brings the features that:
    • You do not need to re-configure your PostgreSQL settings.
    • You can embed this function in your preferred languages: PHP, Java, Ruby, etc...
      • example: 1) replace $1 and $2 into variables of the language you are going to use, 2) escape the double-quotations (" -> \")

Usage

  1. SELECT show_create_table('table_name', 'schema_name');
  2. or
  3. SELECT show_create_table('table_name', null);

Details

see http://sourceforge.jp/projects/pgshowcreatetbl/wiki/

System Requirements

Operating System: OS Independent

Download Package list

pgshowcreatetbl (4 items Hide)

Released at 2010-09-03 13:27
v0.61 (1 files Hide)

Released at 2010-09-03 12:38
v0.6 (1 files Hide)

Released at 2010-09-02 23:57
v0.2 (1 files Hide)

Released at 2010-09-02 09:06
v0.1 (1 files Hide)