26 апр. 2012 г. · You must specify the database to use on connect; if you want to use psql for your script, you can use "\c name_database" |
16 окт. 2010 г. · In PostgreSQL, you can use the \connect meta-command of the client tool psql: \connect DBNAME. or in short: \c DBNAME. |
18 июн. 2013 г. · You can use current_database() if you need to dynamically find out which database you are connected to and which owner you are interested in. |
13 сент. 2016 г. · You can use this syntax. it takes the ID and the name of the database from the pg_databse. $ select pg_database.datname,pg_database.oid from pg_database; |
9 окт. 2014 г. · 1.) Currently using database select current_database() 2.) Connected User select user To get the desired output use either this select 'Database : ' ||current_ ... |
20 сент. 2013 г. · You can enter the following psql meta-command to get some details about a specified database, including its size: \l+ <database_name>. |
27 янв. 2013 г. · I am making a shell script and I only want it to create the database if it doesn't already exist, but up to now, I haven't been able to see how to implement it. |
6 февр. 2013 г. · Try this: SELECT table_name FROM information_schema.tables WHERE table_schema='public' AND table_type='BASE TABLE' this one works! |
8 дек. 2015 г. · The following query can be rewritten as SELECT id FROM my_db.public.user; Where id is column, my_db is database, user is table name, public - is the schema. |
13 сент. 2023 г. · I know that I can get the table names using SELECT 1220970::regclass. But how do I determine a database name from the database ID? |
Novbeti > |
Axtarisha Qayit Anarim.Az Anarim.Az Sayt Rehberliyi ile Elaqe Saytdan Istifade Qaydalari Anarim.Az 2004-2023 |