Olá,

Você pode fazer assim:

create table tabela1(codigo int primary key) tablespace tbs_tabelas;
create table tabela2(codigo int) tablespace tbs_tabelas;
create index indice_tabela2 on tabela2(codigo) tablespace tbs_indices;

Para verificar, você pode digitar \d tabela1 e \d tabela2 no psql.

[]s

2008/5/14 Marcondes Alexandre <[EMAIL PROTECTED]>:

>  Srs, estou iniciando meus estudo em postgresql e gostaria de ajuda da
> comunidade.
>
> $ psql
> > CREATE TABLESPACE tbs_tabelas OWNER postgres LOCATION
> '/etc/postgresql/8.2/main/tablespaces/tabelas';
> > CREATE TABLESPACE tbs_indices OWNER postgres LOCATION
> '/etc/postgresql/8.2/main/tablespaces/indices';
>
> > createdb -D tbs_tabelas -E utf-8 sapc
>
> e preciso criar uma tabela referenciando a tablespace e o índice como
> faço? Segue o código que elaborei
>
>
> create table tAnaliseCredito (
>  ancCodigo            bigint( 19)            not null,
>  cliCodigo            int                   null,
>  tevCodigo            int                   null,
> ancDataRecebimento   datetime              null,
> ancTipoAnalise       char( 1)               null,
> ancFichaCadastral    bit                   null,
> ancRelacaoFornecedor bit                   null,
> ancContratoSocial    bit                   null,
> ancCadastroBull      bit                   null,
>  ancPedido            bit                   null,
> ancValorPedido       money                 null,
> ancConsultaReceita   char( 1)               null,
> ancConsultaSintegra  char( 1)               null,
> ancConsultaSerasa    char( 1)               null,
> ancConsultaSCI       char( 1)               null,
>  ancEletros           char( 1)               null,
> ancFornecedor        char( 1)               null,
> ancValorLimiteConcebido money                 null,
> ancAprovado          bit                   null,
>  ancMotivo            text                  null,
> usuCodigoCriador     int                   null,
> ancDataCriacao       datetime              null,
> usuCodigoModificador int                   null,
> ancDataModificacao   datetime              null,
>  stsCodigo            int                   null,
> constraint PK_ancCodigo primary key  (ancCodigo)
> )
> go
>
>
>
>
> At 11:46 14/5/2008, junior Prado wrote:
>
> Para conhecimento de todos, o hsqldb não trabalha com chave estrangeira em
> esquema diferentes...
>
> 2008/5/14 Leandro DUTRA < [EMAIL PROTECTED]>:
>  2008/5/14 junior Prado <[EMAIL PROTECTED] >:
> >
> >  Tenho um banco postgres geral e estou fazendo um banco hsqldb para
> > trabalhar embutido...
>
> Use o PostgreSQL embutido.
>
> --
> skype:leandro.gfc.dutra?chat Yahoo!: ymsgr:sendIM?lgcdutra
> +55 (11) 3040 7300 r155 gTalk: xmpp:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> +55 (11) 9406 7191 ICQ/AIM: aim:GoIM?screenname=61287803
> +55 (11) 5685 2219 MSN: msnim:chat?contact= [EMAIL PROTECTED]
> _______________________________________________
> pgbr-geral mailing list
>  [email protected]
>  https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>
>
>
> --
> Valter Cezar Prado Junior
> Analista TI
>
> Sem saber como fazer ele fez!
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
>  https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>  *Atenciosamente,
>
> *¬ Marcondes Alexandre
>
>
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>


-- 
João Paulo
www.dextra.com.br/postgres
PostgreSQL
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a