Anasayfa / Etiket Arşivi: postgresql

Etiket Arşivi: postgresql

Postgresql Master Detail Query to Json

Bazen yazdığımız bir sorguyu json olarak çıktı vermek isteriz create table testfatura( id serial primary key not null, fatura_no varchar(10) not null, aciklama varchar(100) not null ); create table testfatura_detay( id serial primary key not null, testfatura_id int not null references testfatura(id), stokkodu varchar(50), stokadi varchar(50) ); insert into testfatura …

Devamını Oku »

ubuntu server 20.04 install postgresql and remote access

sudo apt-get update sudo apt-get upgrade sudo reboot sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update sudo apt-get -y install postgresql   dikkat aşağıdaki işlem veritabanı sunucunuzu tamamen dışarıya açar bilinçli bir şekilde yaptığınızdan …

Devamını Oku »

postgresql find dependent object

https://stackoverflow.com/questions/4462908/find-dependent-objects-for-a-table-or-view   SELECT dependent_ns.nspname as dependent_schema , dependent_view.relname as dependent_view , source_ns.nspname as source_schema , source_table.relname as source_table , pg_attribute.attname as column_name FROM pg_depend JOIN pg_rewrite ON pg_depend.objid = pg_rewrite.oid JOIN pg_class as dependent_view ON pg_rewrite.ev_class = dependent_view.oid JOIN pg_class as source_table ON pg_depend.refobjid = source_table.oid JOIN pg_attribute ON pg_depend.refobjid …

Devamını Oku »