remove postgresql ubuntu
sudo apt-get --purge remove postgresql
sudo apt-get purge postgresql*
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common
remove postgresql ubuntu
sudo apt-get --purge remove postgresql
sudo apt-get purge postgresql*
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common
postgres remove database
DROP DATABASE IF EXISTS database_name;
postgres delete database
CREATE DATABASE testdb1;
DROP DATABASE testdb1;
drop database postgres
DROP DATABASE base_de_datos;
// SI SALE ESTE MESAJE DE ERROR HAGA LOS PASOS QUE ESTAN A CONTINUACION
ERROR: database "base_de_datos" is being accessed by other users
SQL state: 55006
Detail: There is 1 other session using the database.
----------------------------------------------------------------------
// primer paso ---------------------------------
SELECT *
FROM pg_stat_activity
WHERE datname = 'base_de_datos';
//segundo paso --------------------------------
SELECT
pg_terminate_backend (pg_stat_activity.pid)
FROM
pg_stat_activity
WHERE
pg_stat_activity.datname = 'base_de_datos';
// tercer paso --------------------------------
DROP DATABASE 'base_de_datos';
// retira las comillas si no funciona
DROP DATABASE base_de_datos;
drop enum postgres
CREATE TYPE admin_level1 AS ENUM ('classifier', 'moderator');
CREATE TABLE blah (
user_id integer primary key,
power admin_level1 not null
);
INSERT INTO blah(user_id, power) VALUES (1, 'moderator'), (10, 'classifier');
ALTER TYPE admin_level1 ADD VALUE 'god';
INSERT INTO blah(user_id, power) VALUES (42, 'god');
-- .... oops, maybe that was a bad idea
CREATE TYPE admin_level1_new AS ENUM ('classifier', 'moderator');
-- Remove values that won't be compatible with new definition
-- You don't have to delete, you might update instead
DELETE FROM blah WHERE power = 'god';
-- Convert to new type, casting via text representation
ALTER TABLE blah
ALTER COLUMN power TYPE admin_level1_new
USING (power::text::admin_level1_new);
-- and swap the types
DROP TYPE admin_level1;
ALTER TYPE admin_level1_new RENAME TO admin_level1;
postgres delete database
DROP DATABASE db_name;
react native textinput
import React, { Component } from 'react';
import { TextInput } from 'react-native';
export default function UselessTextInput() {
const [textInputValue, setTextInputValue] = React.useState('');
return (
<TextInput
style={{
height: 40,
borderColor: 'gray',
borderWidth: 1,
placeholderTextColor: 'gray',
}}
onChangeText={text => setTextInputValue(text)}
value={textInputValue}
placeholder="Insert your text!"
/>
);
}
react native input
import React, { Component } from 'react';
import { TextInput } from 'react-native';
export default function UselessTextInput() {
const [value, onChangeText] = React.useState('Useless Placeholder');
return (
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1 }}
onChangeText={text => onChangeText(text)}
value={value}
/>
);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us